From 60fe09b34234f697a71d83486e1bedc786d935dc Mon Sep 17 00:00:00 2001 From: chenhaozhe <cgz@hz-kingdee.com> Date: 星期四, 05 六月 2025 08:02:19 +0800 Subject: [PATCH] 完成 2025-05-27 测试记录修改 --- WebTM/views/模治具管理/上模单/Sc_MouldLowerBillEdit.html | 276 ++++ WebTM/views/模治具管理/模治具仓库管理/Sc_MouldScrapOutBill.html | 463 +++++++- WebTM/views/模治具管理/模治具管理/Sb_Add_MouldRepairWorkBillList.html | 192 +++ WebTM/views/模治具管理/模治具管理/Sc_MouldConkBookBillList.html | 4 WebTM/views/模治具管理/模治具管理/Sc_MouldRepairCheckBillList.html | 198 ++ WebTM/views/模治具管理/模治具管理/Sc_Add_MouldMaintainBillList.html | 2 WebTM/views/模治具管理/上模单/Sc_MouldUpperBillEdit.html | 384 +++++- WebTM/views/模治具管理/器具维修派工单/Sc_MouldRepairSendWorkBillEdit.html | 47 WebTM/views/模治具管理/模具状态分析/Sc_MouldStatusAnalysis_Card.js | 22 WebTM/views/模治具管理/模治具管理/Sc_Add_MouldRepairCheckBillList.html | 228 +++ WebTM/views/基础资料/销售基础资料/Gy_Customer.html | 5 WebTM/views/基础资料/公用基础资料/Gy_ManualSynchronization.html | 118 ++ WebTM/views/模治具管理/上模单/Sc_MouldLowerBillList.html | 340 +++++ WebTM/views/模治具管理/上模单/Sc_MouldUpperBillList.html | 349 +++++- WebTM/layuiadmin/Scripts/webConfig.js | 2 WebTM/views/模治具管理/模治具仓库管理/Sc_MouldScrapOutBillList.html | 431 ++++++- WebTM/views/模治具管理/模具状态分析/Sc_MouldStatusAnalysis.html | 186 +++ WebTM/views/模治具管理/模治具管理/Sc_Add_MouldConkBookBillList.html | 2 WebTM/WebTM.csproj | 1 19 files changed, 2,800 insertions(+), 450 deletions(-) diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj index 5041760..133a28a 100644 --- a/WebTM/WebTM.csproj +++ b/WebTM/WebTM.csproj @@ -441,6 +441,7 @@ <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_AreaSet_ExtendDoubleClickReturn.html" /> <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_BadPhenomena_Excel.html" /> <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_CusType_ExtendDoubleClickReturn.html" /> + <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_ManualSynchronization.html" /> <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_MaterialCorrection.html" /> <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_MaterialCorrection2.html" /> <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_SupType_ExtendDoubleClickReturn.html" /> diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js index de7bc77..ca3bde2 100644 --- a/WebTM/layuiadmin/Scripts/webConfig.js +++ b/WebTM/layuiadmin/Scripts/webConfig.js @@ -31,7 +31,7 @@ //var WEBURL = "http://192.168.60.12/API"; //涓帶 //var WEBURL = "http://192.168.6.5:8082/API/"; //鑸滄垚 /*var WEBURL = "http://121.36.199.126:8181/API/"; //涓夊崌*/ - /*var WEBURL = "http://localhost:81/API";*/ + var WEBURL = "http://localhost:81/API"; return WEBURL } diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ManualSynchronization.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ManualSynchronization.html" new file mode 100644 index 0000000..e57db3b --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ManualSynchronization.html" @@ -0,0 +1,118 @@ +<!DOCTYPE html> +<html> + +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>鎵嬪伐鍚屾</title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> + <script src="../../../layuiadmin/layui/layui.js"></script> + <script src="../../../layuiadmin/Scripts/json2.js"></script> + <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> + <script src="../../../layuiadmin/Scripts/webConfig.js"></script> + <script src="../../../layuiadmin/PubCustom.js"></script> + + <style type="text/css"> + input.layui-input.layui-unselect { + padding-right: 0; + } + </style> +</head> + +<body> + <div class="layui-fluid"> + <div class="layui-col-md12"> + <div class="layui-card" style="padding: 1px"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="component-form-group"> + <div class="layui-collapse"> + <h1 style="text-align: center; padding: 30px 0;"><b>鎵嬪伐鍚屾</b></h1> + <div class="layui-colla-item" + style="padding-top:20px; display: flex; flex-direction: row; align-items: center; justify-content: center;"> + <div class="layui-inline layui-form-item"> + <div class="layui-input-group"> + <label class="layui-form-label" style="width: 85px;">鍗曟嵁绫诲瀷</label> + <input type="text" class="layui-input"> + <div class="layui-input-split layui-input-suffix" style="cursor: pointer;"> + <i class="layui-icon layui-icon-search"></i> + </div> + </div> + </div> + <div class="layui-inline layui-form-item"> + <div class="layui-input-group"> + <label class="layui-form-label layui-input-prefix" style="width: 85px;">鍗曟嵁鍙�</label> + <input type="text" class="layui-input"> + <div class="layui-input-split layui-input-suffix" style="cursor: pointer;"> + <i class="layui-icon layui-icon-search"></i> + </div> + </div> + </div> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" + lay-filter="btn_Synchronization" id="btn_Synchronization" + style="padding:0 30px;margin-left:50px;">鍚屾</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" + lay-filter="btn_Cancel" id="btn_Cancel" style="padding:0 20px">閫�鍑�</button> + </div> + <div class="layui-colla-item" style="height:600px;margin-top:20px;"> + <font size="5" color="blue" id="HRemark"></font> + </div> + </div> + <table class="" id="mainTable" lay-filter="mainTable"></table> + </form> + </div> + </div> + </div> + </div> + <script type="text/javascript"> + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index', //涓诲叆鍙fā鍧� + }).use(['index', 'form', 'laydate', 'table', 'element'], function () { + //#region 鍏叡鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element; + var HModName = "JIT_PickUpCalculate"; + var HMaker = sessionStorage["HUserName"] + var HStockOrgID = sessionStorage["OrganizationID"] //缁勭粐ID + //#endregion + + //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤� + if (sessionStorage.login != "login") { + layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", { + icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍'] + }, function () { window.location.href = "../../user/login.html"; }); + } + //#region 鍒濆鍖栫晫闈� + + set_ClearBill(); + + function set_ClearBill() { + + } + //#endregion + //#endregion + + //#region 閫�鍑� + form.on('submit(btn_Cancel)', function () { + layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) { + Pub_Close(2); + }); + }) + //#endregion + + }); + + //浠ヤ笂涓簂ayui妯″潡 + //姝ゅ鏂规硶娑夊強鍒拌澶栭儴椤甸潰parent.鏂规硶鍚嶈皟鐢ㄧ殑蹇呴』鏀惧湪Layui鏂规硶澶栭儴 + </script> +</body> + +</html> \ No newline at end of file diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" index 69a20e7..2257483 100644 --- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\224\200\345\224\256\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Customer.html" @@ -794,7 +794,7 @@ //#region 蹇�熸煡璇㈡寜閽� function get_FastQuery() { - sWhere = ""; + // sWhere = ""; var HNumber = $("#HNumber").val(); var HName = $("#HName").val(); var ColName = $("#ColName").val();//澶嶉�夋 @@ -1636,11 +1636,12 @@ function addSWhereByOpenType() { //鑾峰彇鍙傛暟 var params = getUrlVars(); + debugger var openType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鎵撳紑鏂瑰紡 1鐩存帴鎵撳紑 2鍏跺畠椤甸潰閫氳繃閫夋嫨鎸夐挳鎵撳紑 var HOrgID = params[params[1]]; if (openType == 2) { sWhere += " and 绂佺敤鏍囪 = '' and 瀹℃牳浜� !=''"; - Organ(HOrgID); + // Organ(HOrgID); } } diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillEdit.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillEdit.html" index 6541648..1dfad0e 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillEdit.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillEdit.html" @@ -1,11 +1,13 @@ 锘�<!DOCTYPE html> <html> + <head> <meta charset="utf-8" /> <title>涓嬫ā鍗曠紪杈�</title> <meta name="renderer" content="webkit"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <meta name="viewport" + content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> @@ -15,18 +17,26 @@ <script src="../../../layuiadmin/Scripts/webConfig.js"></script> <script src="../../../layuiadmin/PubCustom.js"></script> <script src="../../../layuiadmin/PageTitle.js"></script> + <script src="../../../layuiadmin/common.js"></script> + <script src="../../../layuiadmin/SetColumn.js"></script> </head> + <body> <div class="layui-fluid" style="padding: 0;"> <div class="layui-card" style="padding: 2px;background-color: #efefef;"> <div class="layui-card-body" style="padding: 1px;"> <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> <div style="padding: 2px; "> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏂板</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">淇濆瓨</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">鍙嶅鏍�</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">閫�鍑�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" + lay-filter="btnSearch" id="btnSearch">鏂板</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" + lay-filter="btnSave" id="btnSave">淇濆瓨</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" + lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" + lay-filter="set_AbandonCheck" id="set_AbandonCheck">鍙嶅鏍�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" + lay-filter="btnEdit" id="btnEdit">閫�鍑�</button> </div> <div class="layui-tab" lay-filter="tab-POStockInBill"> <ul class="layui-tab-title" lay-filter="tab-all"> @@ -41,23 +51,34 @@ <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="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> - <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID"> + <input type="text" class="layui-input" name="HBillNo" + lay-verify="HBillNo" id="HBillNo" + style="background-color:#efefef4d;" readonly> + <input type="hidden" name="HInterID" id="HInterID" + lay-verify="HInterID"> <input type="hidden" name="HOrgID" id="HOrgID" lay-verify="HOrgID"> </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="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 80px;"> + <input type="date" class="layui-input" lay-verify="HDate" name="HDate" + id="HDate" style="padding-left: 80px;"> </div> </div> <div class="layui-inline"> - <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇閮ㄩ棬*</label> + <label class="layui-form-label" + style="width: 85px;padding: 9px 18px;">鐢熶骇閮ㄩ棬*</label> <div class="layui-input-block" style="margin-left: 77px;"> - <input type="text" class="layui-input" lay-verify="HDeptName" name="HDeptName" id="HDeptName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> - <input type="hidden" id="HDeptID" name="HDeptID" lay-verify="HDeptID" value="0" /> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHDeptID" id="btnHDeptID" style="padding: 0 10px;float: right;margin-right: 3px;"> + <input type="text" class="layui-input" lay-verify="HDeptName" + name="HDeptName" id="HDeptName" + style="background-color:#efefef4d;width: 60%;display: inline-block;" + readonly> + <input type="hidden" id="HDeptID" name="HDeptID" lay-verify="HDeptID" + value="0" /> + <button class="layui-btn layuiadmin-btn-order" type="button" + lay-submit="" lay-filter="btnHDeptID" id="btnHDeptID" + style="padding: 0 10px;float: right;margin-right: 3px;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> </button> </div> @@ -66,21 +87,35 @@ <div class="layui-row"> <div class="layui-inline"> - <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鎿嶄綔鍛�*</label> + <label class="layui-form-label" + style="width: 85px;padding: 9px 18px;">鎿嶄綔鍛�*</label> <div class="layui-input-block" style="margin-left: 77px;"> - <input type="text" class="layui-input" lay-verify="HEmpName" name="HEmpName" id="HEmpName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> - <input type="hidden" id="HEmpID" name="HEmpID" lay-verify="HEmpID" value="0" /> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEmpID" id="btnHEmpID" style="padding: 0 10px;float: right;margin-right: 3px;"> + <input type="text" class="layui-input" lay-verify="HEmpName" + name="HEmpName" id="HEmpName" + style="background-color:#efefef4d;width: 60%;display: inline-block;" + readonly> + <input type="hidden" id="HEmpID" name="HEmpID" lay-verify="HEmpID" + value="0" /> + <button class="layui-btn layuiadmin-btn-order" type="button" + lay-submit="" lay-filter="btnHEmpID" id="btnHEmpID" + style="padding: 0 10px;float: right;margin-right: 3px;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> </button> </div> </div> <div class="layui-inline"> - <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">璐熻矗浜�*</label> + <label class="layui-form-label" + style="width: 85px;padding: 9px 18px;">璐熻矗浜�*</label> <div class="layui-input-block" style="margin-left: 77px;"> - <input type="text" class="layui-input" lay-verify="HMangerName" name="HMangerName" id="HMangerName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> - <input type="hidden" id="HMangerID" name="HMangerID" lay-verify="HMangerID" value="0" /> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMangerID" id="btnHMangerID" style="padding: 0 10px;float: right;margin-right: 3px;"> + <input type="text" class="layui-input" lay-verify="HMangerName" + name="HMangerName" id="HMangerName" + style="background-color:#efefef4d;width: 60%;display: inline-block;" + readonly> + <input type="hidden" id="HMangerID" name="HMangerID" + lay-verify="HMangerID" value="0" /> + <button class="layui-btn layuiadmin-btn-order" type="button" + lay-submit="" lay-filter="btnHMangerID" id="btnHMangerID" + style="padding: 0 10px;float: right;margin-right: 3px;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> </button> </div> @@ -90,7 +125,9 @@ <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="HRemark" id="HRemark" lay-verify="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style=" width: 500px;"> + <input type="text" class="layui-input" name="HRemark" id="HRemark" + lay-verify="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" + onmouseover="this.title=this.value" style=" width: 500px;"> </div> </div> </div> @@ -103,19 +140,22 @@ <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="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="HMaker" id="HMaker" + style="background-color:#efefef4d;" readonly> </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="hupdater" id="hupdater" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hupdater" id="hupdater" + style="background-color:#efefef4d;" readonly> </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="hchecker" id="hchecker" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hchecker" id="hchecker" + style="background-color:#efefef4d;" readonly> </div> </div> </div> @@ -123,19 +163,22 @@ <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="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" + style="background-color:#efefef4d;" readonly> </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="hupdatedate" id="hupdatedate" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hupdatedate" + id="hupdatedate" style="background-color:#efefef4d;" readonly> </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="hcheckdate" id="hcheckdate" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hcheckdate" id="hcheckdate" + style="background-color:#efefef4d;" readonly> </div> </div> </div> @@ -143,13 +186,15 @@ <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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" + style="background-color:#efefef4d;" readonly> </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="hdeleteman" id="hdeleteman" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hdeleteman" id="hdeleteman" + style="background-color:#efefef4d;" readonly> </div> </div> </div> @@ -157,13 +202,15 @@ <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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" + style="background-color:#efefef4d;" readonly> </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="hdeletedate" id="hdeletedate" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hdeletedate" + id="hdeletedate" style="background-color:#efefef4d;" readonly> </div> </div> </div> @@ -176,6 +223,7 @@ <div class="layui-btn-container"> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button> + <button type="button" class="layui-btn layui-btn-sm" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> </div> </script> </form> @@ -185,9 +233,10 @@ <script type="text/html" id="barDemo"> <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>--> - <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> </script> <script> + var optionData = []; layui.config({ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ @@ -312,6 +361,9 @@ table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓� } break; + //鍒楄缃� + case 'set_HideColumn': get_HideColumnEdit(HModName, sessionStorage["HUserName"], option, table); + break; } }); @@ -352,7 +404,8 @@ //鍒濆鍖栧垪琛� function set_InitGrid() { - option = { + let unEditableColStyle = 'background-color: #eeeeee;' + option = { elem: '#mainTable' , toolbar: '#toolbarDemo' , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲� @@ -360,11 +413,11 @@ , height: 650 , cols: [[ //琛ㄥご { type: 'checkbox', totalRowText: '鍚堣琛�' } - , { type: 'numbers', title: '搴忓彿', totalRow: true } + , { type: 'numbers', title: '搴忓彿', totalRow: true, style: unEditableColStyle } , { field: 'HMouldID', title: 'HMouldID', hide: true } , { field: 'HMouldNumber', title: '鍣ㄥ叿浠g爜', edit: 'text', event: "HMouldID" } - , { field: 'HMouldName', title: '鍣ㄥ叿鍚嶇О' } - , { field: 'HMouldModel', title: '鍣ㄥ叿瑙勬牸' } + , { field: 'HMouldName', title: '鍣ㄥ叿鍚嶇О', style: unEditableColStyle } + , { field: 'HMouldModel', title: '鍣ㄥ叿瑙勬牸', style: unEditableColStyle } , { field: 'HQty', title: '鏁伴噺', edit: 'text', totalRow: true } , { field: 'HSourceID', title: 'HSourceID', hide: true } , { field: 'HSourceName', title: '鐢熶骇璧勬簮', edit: 'text', event: "HSourceID" } @@ -539,17 +592,63 @@ var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹� - if (checkStatus.data.length != 1) { + if (checkStatus.data.length === 0) { return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); } - //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� - obj.update({ - "HMouldID": checkStatus.data[0].hmainid - , "HMouldNumber": checkStatus.data[0].妯″叿缂栧彿 - , "HMouldName": checkStatus.data[0].妯″叿鍚嶇О - , "HMouldModel": checkStatus.data[0].妯″叿鍨嬪彿 - }) + if (checkStatus.data.length === 1) { + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + obj.update({ + "HMouldID": checkStatus.data[0].hmainid + , "HMouldNumber": checkStatus.data[0].妯″叿缂栧彿 + , "HMouldName": checkStatus.data[0].妯″叿鍚嶇О + , "HMouldModel": checkStatus.data[0].妯″叿鍨嬪彿 + }) + } else { + let tableBak = table.cache['mainTable'] + let tempArr = [] + + for (let tableOne of tableBak) { + if (isEmpty(tableOne.HMouldID, true, true) === false) { + tempArr.push(tableOne) + } + } + + for (let checkOne of checkStatus.data) { + tempArr.push({ + "HMouldID": checkOne.hmainid + , "HMouldNumber": checkOne.妯″叿缂栧彿 + , "HMouldName": checkOne.妯″叿鍚嶇О + , "HMouldModel": checkOne.妯″叿鍨嬪彿 + }) + } + debugger + + table.reload('mainTable', { + data: tempArr + }) + } + layer.close(index);//鍏抽棴寮圭獥 + }, end: function () { + if (isEmpty(optionData) === false) { + obj.update({ + "HMouldID": optionData[0].hmainid + , "HMouldNumber": optionData[0].妯″叿缂栧彿 + , "HMouldName": optionData[0].妯″叿鍚嶇О + , "HMouldModel": optionData[0].妯″叿鍨嬪彿 + }) + optionData = [] + } + + let tableCache = table.cache['mainTable'] + for (tableOne of tableCache) { + if (isEmpty(tableOne.HQty, true, true) === true) { + tableOne.HQty = 1 + } + } + table.reload('mainTable', { + data: tableCache + }) } }) } @@ -580,6 +679,14 @@ , "HSourceID": checkStatus.data[0].HItemID }) layer.close(index);//鍏抽棴寮圭獥 + }, end: function () { + if (isEmpty(optionData) === false) { + obj.update({ + "HSourceName": optionData[0].鐢熶骇璧勬簮鍚嶇О + , "HSourceID": optionData[0].HItemID + }) + optionData = [] + } } }) } @@ -611,6 +718,15 @@ , "HICMOBillNo": checkStatus.data[0].鍗曟嵁鍙� }) layer.close(index);//鍏抽棴寮圭獥 + }, end: function () { + if (isEmpty(optionData) === false) { + obj.update({ + "HICMOInterID": optionData[0].hmainid + , "HICMOEntryID": optionData[0].HEntryID + , "HICMOBillNo": optionData[0].鍗曟嵁鍙� + }) + optionData = [] + } } }) } @@ -635,8 +751,61 @@ //涓昏〃 form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫�� - "HBillNo": d.data[0].鍗曟嵁鍙� - , "HInterID": d.data[0].hmainid + "HBillNo": d.data[0].鍗曟嵁鍙� + , "HInterID": d.data[0].hmainid + , "HDate": Format(new Date(d.data[0].鏃ユ湡), "yyyy-MM-dd") + , "HDeptID": d.data[0].HDeptID + , "HDeptName": d.data[0].閮ㄩ棬 + , "HEmpID": d.data[0].HEmpID + , "HEmpName": d.data[0].鎿嶄綔鍛� + , "HMangerID": d.data[0].HMangerID + , "HMangerName": d.data[0].璐熻矗浜� + , "HRemark": d.data[0].琛ㄥご澶囨敞 + //鍏朵粬淇℃伅 + , "hmakers": d.data[0].鍒跺崟浜� + , "hmakedate": d.data[0].鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(d.data[0].鍒跺崟鏃ユ湡), "yyyy-MM-dd") + , "hchecker": d.data[0].瀹℃牳浜� + , "hcheckdate": d.data[0].瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(d.data[0].瀹℃牳鏃ユ湡), "yyyy-MM-dd") + , "hupdater": d.data[0].淇敼浜� + , "hupdatedate": d.data[0].淇敼鏃ユ湡 == null ? "" : Format(new Date(d.data[0].淇敼鏃ユ湡), "yyyy-MM-dd") + , "hdeleteman": d.data[0].浣滃簾浜� + , "hdeletedate": d.data[0].浣滃簾鏃ユ湡 == null ? "" : Format(new Date(d.data[0].浣滃簾鏃ユ湡), "yyyy-MM-dd") + , "HCloseMan": d.data[0].鍏抽棴浜� + , "HCloseDate": d.data[0].鍏抽棴鏃ユ湡 == null ? "" : Format(new Date(d.data[0].鍏抽棴鏃ユ湡), "yyyy-MM-dd") + }); + + //瀛愯〃 璧嬪�� + var rowdata = []; + for (var i = 0; i < d.data.length; i++) { + rowdata.push( + { + "HMouldID": d.data[i].HMouldID, "HMouldNumber": d.data[i].妯″叿缂栫爜, "HMouldName": d.data[i].妯″叿鍚嶇О, "HMouldModel": d.data[i].妯″叿瑙勬牸, "HQty": d.data[i].鏁伴噺 + , "HSourceID": d.data[i].HSourceID, "HSourceName": d.data[i].鐢熶骇璧勬簮, "HICMOInterID": d.data[i].HICMOInterID, "HICMOEntryID": d.data[i].HICMOEntryID, "HICMOBillNo": d.data[i].HICMOBillNo + } + ) + } + option.data = rowdata; + table.render(option); + } + }) + } + //缂栬緫 椤甸潰璧嬪�� + function RoadBillMain_SkipArg()//鍔犺浇琛ㄥご + { + var sWhere = " and hmainid='" + linterid + "'"; + let thisOption = option + debugger + $.ajax({ + url: GetWEBURL() + "/Sc_MouldUpperBill/Sc_MouldLowerBillList", + type: "GET", + async: false, + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, + success: function (d) { + + //涓昏〃 + form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫�� + "HBillNo": d.data[0].鍗曟嵁鍙� + , "HInterID": d.data[0].hmainid , "HDate": Format(new Date(d.data[0].鏃ユ湡), "yyyy-MM-dd") , "HDeptID": d.data[0].HDeptID , "HDeptName": d.data[0].閮ㄩ棬 @@ -785,6 +954,19 @@ } } + function GetMouldFileValue(data) { + optionData = data + } + + function GetGySource(data) { + optionData = data + } + + function GetICMOBillValue(data) { + optionData = data + } + </script> </body> + </html> \ No newline at end of file diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillList.html" index adf9aef..e2922bc 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldLowerBillList.html" @@ -1,5 +1,6 @@ 锘�<!DOCTYPE html> <html> + <head> <meta charset="utf-8" /> <title>涓嬫ā鍗曞垪琛�</title> @@ -16,6 +17,7 @@ <script src="../../../layuiadmin/SetColumn.js"></script> <script src="../../../layuiadmin/HideButton_New.js"></script> </head> + <body> <div class="layui-fluid"> <div class="layui-col-md12"> @@ -32,81 +34,80 @@ <div class="layui-inline"> <label class="layui-form-label">鏃ユ湡闂撮殧</label> <div class="layui-input-block"> - <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;"> + <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" + lay-filter="HInitTimeCycle" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> <label class="layui-form-label" style="width: 85px;">寮�濮嬫棩鏈�</label> <div class="layui-input-inline"> - <input type="date" class="layui-input ForFilteringSchemes" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> + <input type="date" class="layui-input ForFilteringSchemes" name="HBeginDate" + id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" + placeholder="yyyy-MM-dd"> </div> </div> <div class="layui-inline"> <label class="layui-form-label" style="width: 85px;">缁撴潫鏃ユ湡</label> <div class="layui-input-inline"> - <input type="date" class="layui-input ForFilteringSchemes" name="HEndDate" id="HEndDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> + <input type="date" class="layui-input ForFilteringSchemes" name="HEndDate" + id="HEndDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" + placeholder="yyyy-MM-dd"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">鍗曟嵁鍙�:</label> <div class="layui-input-inline"> - <input class="layui-input ForFilteringSchemes" name="HBillNo" lay-verify="HBillNo" id="HBillNo" autocomplete="off"> + <input class="layui-input ForFilteringSchemes" name="HBillNo" + lay-verify="HBillNo" id="HBillNo" autocomplete="off"> </div> </div> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏌ヨ</button> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" + lay-filter="btnSearch" id="btnSearch">鏌ヨ</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" + lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button> <!--鏄剧ず褰撳墠杩囨护鏂规--> <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 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:5px"> + <div class="lay-row" style="margin: 5px 0;"> <div class="layui-inline"> - <label class="layui-form-label">杩囨护</label> - <div class="layui-input-block"> - <select name="ColName" id="ColName" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;"> + <label class="layui-form-label" style="width: 85px;">缁勭粐</label> + <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> + <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" + class="ForFilteringSchemes"> + <!--鍔ㄦ�佹覆鏌撶粍缁�--> </select> </div> - </div> - <div class="layui-inline"> - <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;"> - <option value="0" selected="selected"></option> - <option value="=">=</option> - <option value=">=">>=</option> - <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> - <option value="7">鍖呭惈</option> - <option value="8">宸﹀寘鍚�</option> - <option value="9">鍙冲寘鍚�</option> - <option value="10">涓嶅寘鍚�</option> - </select> - </div> - <div class="layui-inline"> - <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent"> </div> </div> <div class="layui-row" style="margin-top:5px"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;"> + <select name="ColName" id="ColName" class="ForFilteringSchemes" + lay-filter="ColName" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;"> + <select name="Comparator" id="Comparator" class="ForFilteringSchemes" + lay-filter="Comparator" style="width:190px;"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> <option value="7">鍖呭惈</option> <option value="8">宸﹀寘鍚�</option> <option value="9">鍙冲寘鍚�</option> @@ -114,26 +115,33 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input" value="" name="ColContent1" id="ColContent1"> + <input type="text" class="layui-input ForFilteringSchemes" value="" + name="ColContent" id="ColContent"> </div> </div> <div class="layui-row" style="margin-top:5px"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;"> + <select name="ColName1" id="ColName1" lay-filter="ColName1" + class="ForFilteringSchemes" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;"> + <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" + class="ForFilteringSchemes" style="width:190px;"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> <option value="7">鍖呭惈</option> <option value="8">宸﹀寘鍚�</option> <option value="9">鍙冲寘鍚�</option> @@ -141,7 +149,42 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input" value="" name="ColContent2" id="ColContent2"> + <input type="text" class="layui-input ForFilteringSchemes" value="" + name="ColContent1" id="ColContent1"> + </div> + </div> + <div class="layui-row" style="margin-top:5px"> + <div class="layui-inline"> + <label class="layui-form-label">杩囨护</label> + <div class="layui-input-block"> + <select name="ColName2" id="ColName2" lay-filter="ColName2" + class="ForFilteringSchemes" style="width:190px;"> + </select> + </div> + </div> + <div class="layui-inline"> + <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" + class="ForFilteringSchemes" style="width:190px;"> + <option value="0" selected="selected"></option> + <option value="=">=</option> + <option value=">=">>=</option> + <option value=">">></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> + <option value="7">鍖呭惈</option> + <option value="8">宸﹀寘鍚�</option> + <option value="9">鍙冲寘鍚�</option> + <option value="10">涓嶅寘鍚�</option> + </select> + </div> + <div class="layui-inline"> + <input type="text" class="layui-input ForFilteringSchemes" value="" + name="ColContent2" id="ColContent2"> </div> </div> </div> @@ -153,7 +196,9 @@ <div class="layui-btn-container" id="toolbarDemo_ButtonSet"> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_AddNew" lay-event="set_AddNew"><i class="layui-icon layui-icon-form"></i>鏂板</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_ShowBill" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Copy" id="btn-Copy"><i class="layui-icon layui-icon-transfer"></i>澶嶅埗</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_DeleteBill" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-form"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Export" id="btn-Export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button> @@ -175,6 +220,7 @@ </div> </div> </body> + </html> <script> var treeCkData = { id: 0 }; @@ -185,7 +231,7 @@ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ index: 'lib/index', //涓诲叆鍙fā鍧� - }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util','soulTable'], function () { + }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'soulTable'], function () { //#region 鍏敤鍙橀噺 var $ = layui.$ , admin = layui.admin @@ -215,7 +261,7 @@ var HModuleType = "3847"; //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType); - //#endregion + //#endregion //杩囨护鏉′欢鐨刢lass绫� var HClassTag = "ForFilteringSchemes"; @@ -243,9 +289,14 @@ case 'set_ShowBill': set_ShowBill(); break; + //澶嶅埗 + case 'btn-Copy': set_CopyBill(); + break; //鍒犻櫎 - case 'set_DeleteBill': - set_DeleteBill(); + case 'set_DeleteBill': set_DeleteBill(); + break; + //瀵煎嚭 + case 'btn-Export': get_Export(); break; //瀹℃牳 case 'set_CheckBill': @@ -297,6 +348,13 @@ }; }); + // 鑷畾涔夊伐鍏蜂簨浠� + table.on('tool(mainTable)', function (obj) { + let data = obj.data + switch (obj.event) { + case "onHBillNumberClickHandler": onHBillNumberClickHandler(data); break; + } + }) //鏌ヨ form.on('submit(btnSearch)', function (data) { if (page != 1) { @@ -336,6 +394,8 @@ //鍒濆鍖栨煡璇� function set_ClearBill() { + // 鍒濆鍖栫粍缁� + Organ() set_InitGrid(); //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规 get_DefaultModule(); @@ -441,7 +501,7 @@ sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'"; } if (HBeginDate != "" && HEndDate != "") { - sWhere += "and 鏃ユ湡 between '" + HBeginDate + "' and '" + HEndDate+"'"; + sWhere += "and 鏃ユ湡 between '" + HBeginDate + "' and '" + HEndDate + "'"; } if (GetDataCols != "") { sWhere += GetDataCols; @@ -458,7 +518,7 @@ option = { elem: '#mainTable' , toolbar: '#toolbarDemo' - , height: 450 + , height: 'full-130' , page: false , cellMinWidth: 90 , limit: 50 @@ -528,7 +588,16 @@ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); break; default: - col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + if (data[i].name === '鍗曟嵁鍙�') { + col.push({ + field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, + templet: function (d) { + return '<span style="color: blue;" lay-unrow >' + d.鍗曟嵁鍙� + '</span>' + }, style: 'cursor: pointer;', event: 'onHBillNumberClickHandler' + }); + } else { + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } } } } @@ -546,8 +615,9 @@ ins = table.render(option); layer.close(ajaxLoad); - if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { + if ($("#ColName option").length < 1) { ColFilter(); + get_DefaultModule() } //鍒锋柊鎸夐挳鏄剧ず @@ -693,7 +763,7 @@ $.ajax({ type: "GET", url: GetWEBURL() + "/Sc_MouldUpperBill/DeltetSc_MouldLowerBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� - data: { "HInterID": HInterID.toString(), "HPRDORGID": sessionStorage["OrganizationID"], "user": sessionStorage["HUserName"]}, + data: { "HInterID": HInterID.toString(), "HPRDORGID": sessionStorage["OrganizationID"], "user": sessionStorage["HUserName"] }, success: function (result) { if (result.count == 1) { layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { @@ -867,6 +937,31 @@ }); }) //#endregion + + + //鑾峰彇缁勭粐 + function Organ() { + //鑾峰彇鐧诲綍椤电粍缁囧垪 + $.ajax({ + type: "get", + async: false, + url: GetWEBURL() + "/Web/GetOrganizations", + success: function (result) { + var Organization = ""; + if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + var data = result.data; + for (var i = 0; i < data.length; i++) { + Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; + } + $("#HOrgID").append(Organization); + $("#HOrgID").val(sessionStorage["OrganizationID"]) + form.render("select"); + } + layer.closeAll("loading"); + } + }) + } + //#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃 function setSelect_HInitTimeCycle() { @@ -1095,6 +1190,54 @@ , title: '杩囨护鏂规鍒楄〃' , shift: 0//寮瑰嚭鍔ㄧ敾 , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName + , btn: ['纭', '鍙栨秷'], + btn1: function (index, laero) { + //鎸夐挳涓� 鐨勫洖璋� + var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹� + + if (checkStatus.data.length !== 1) { + return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + let hmainid = checkStatus.data[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].HInterID + //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢 + 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); + } + } + + layer.close(index);//鍏抽棴寮圭獥 + + } else { + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + + }, + btn2: function () { + HIsClose_Manual = true; + } , cancel: function () { // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫 HIsClose_Manual = true; @@ -1181,11 +1324,106 @@ $("#ColName2").append(Organization); form.render('select'); } - //#endregion + //#endregion + + // 澶嶅埗 + function set_CopyBill() { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var linterid = data[0].hmainid; + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '缂栬緫' + HPageTitle + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../../妯℃不鍏风鐞�/涓婃ā鍗�/Sc_MouldLowerBillEdit.html?OperationType=2&linterid=' + linterid + '&HEntryID=&HSouceBillType=3847' + }) + } else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹鍒讹紒'); + } + } + + //#region 瀵煎嚭Execel + function get_Export() { + var ModRightNameCheck = "Sc_MouldLowerBill_ExportExcel"; + + //閫昏緫瀹℃牳鏂规硶 + $.ajax({ + type: "GET", + url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.count == 1) { + table.exportFile(ins.config.id, option.data, "xls"); + } else { + layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 }); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + //#endregion + + + //#region 鑷畾涔変簨浠舵崟鑾� + function onHBillNumberClickHandler(data) { + var linterid = data.hmainid; + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '缂栬緫' + HPageTitle + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../../妯℃不鍏风鐞�/涓婃ā鍗�/Sc_MouldLowerBillEdit.html?OperationType=3&linterid=' + linterid + '&HEntryID=&HSouceBillType=3847' + }) + } + //#endregion + + //#endregion //浠ヤ笂鏄痩ayui妯″潡 }); function GetDataCol(data) { GetDataCols = data; } + + //#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].HInterID + //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢 + 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 </script> \ No newline at end of file diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillEdit.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillEdit.html" index f63e350..7bdfa44 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillEdit.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillEdit.html" @@ -1,32 +1,44 @@ 锘�<!DOCTYPE html> <html> + <head> <meta charset="utf-8" /> <title>涓婃ā鍗曠紪杈�</title> <meta name="renderer" content="webkit"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <meta name="viewport" + content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> - <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> <script src="../../../layuiadmin/layui/layui.js"></script> <script src="../../../layuiadmin/Scripts/json2.js"></script> <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> <script src="../../../layuiadmin/Scripts/webConfig.js"></script> <script src="../../../layuiadmin/PubCustom.js"></script> + <script src="../../../layuiadmin/soulTable.slim.js"></script> + <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> <script src="../../../layuiadmin/PageTitle.js"></script> + <script src="../../../layuiadmin/SetColumn.js"></script> + <script src="../../../layuiadmin/common.js"></script> + <script src="../../../layuiadmin/HideButton_New.js"></script> </head> + <body> <div class="layui-fluid" style="padding: 0;"> <div class="layui-card" style="padding: 2px;background-color: #efefef;"> <div class="layui-card-body" style="padding: 1px;"> - <form class="layui-form" action="" lay-filter="formData" style="background-color:white;" > + <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> <div style="padding: 2px; "> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏂板</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">淇濆瓨</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">鍙嶅鏍�</button> - <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">閫�鍑�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" + lay-filter="btnSearch" id="btnSearch">鏂板</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" + lay-filter="btnSave" id="btnSave">淇濆瓨</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" + lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" + lay-filter="set_AbandonCheck" id="set_AbandonCheck">鍙嶅鏍�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" + lay-filter="btnEdit" id="btnEdit">閫�鍑�</button> </div> <div class="layui-tab" lay-filter="tab-POStockInBill"> <ul class="layui-tab-title" lay-filter="tab-all"> @@ -41,23 +53,34 @@ <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="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> - <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID"> - <input type="hidden" name="HOrgID" id="HOrgID" lay-verify="HOrgID"> + <input type="text" class="layui-input" name="HBillNo" + lay-verify="HBillNo" id="HBillNo" + style="background-color:#efefef4d;" readonly> + <input type="hidden" name="HInterID" id="HInterID" + lay-verify="HInterID"> + <!-- <input type="hidden" name="HOrgID" id="HOrgID" lay-verify="HOrgID"> --> </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="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 80px;"> + <input type="date" class="layui-input" lay-verify="HDate" name="HDate" + id="HDate" style="padding-left: 80px;"> </div> </div> <div class="layui-inline"> - <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇閮ㄩ棬*</label> + <label class="layui-form-label" + style="width: 85px;padding: 9px 18px;">鐢熶骇閮ㄩ棬*</label> <div class="layui-input-block" style="margin-left: 77px;"> - <input type="text" class="layui-input" lay-verify="HDeptName" name="HDeptName" id="HDeptName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> - <input type="hidden" id="HDeptID" name="HDeptID" lay-verify="HDeptID" value="0" /> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHDeptID" id="btnHDeptID" style="padding: 0 10px;float: right;margin-right: 3px;"> + <input type="text" class="layui-input" lay-verify="HDeptName" + name="HDeptName" id="HDeptName" + style="background-color:#efefef4d;width: 60%;display: inline-block;" + readonly> + <input type="hidden" id="HDeptID" name="HDeptID" lay-verify="HDeptID" + value="0" /> + <button class="layui-btn layuiadmin-btn-order" type="button" + lay-submit="" lay-filter="btnHDeptID" id="btnHDeptID" + style="padding: 0 10px;float: right;margin-right: 3px;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> </button> </div> @@ -66,21 +89,35 @@ <div class="layui-row"> <div class="layui-inline"> - <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鎿嶄綔鍛�*</label> + <label class="layui-form-label" + style="width: 85px;padding: 9px 18px;">鎿嶄綔鍛�*</label> <div class="layui-input-block" style="margin-left: 77px;"> - <input type="text" class="layui-input" lay-verify="HEmpName" name="HEmpName" id="HEmpName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> - <input type="hidden" id="HEmpID" name="HEmpID" lay-verify="HEmpID" value="0" /> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEmpID" id="btnHEmpID" style="padding: 0 10px;float: right;margin-right: 3px;"> + <input type="text" class="layui-input" lay-verify="HEmpName" + name="HEmpName" id="HEmpName" + style="background-color:#efefef4d;width: 60%;display: inline-block;" + readonly> + <input type="hidden" id="HEmpID" name="HEmpID" lay-verify="HEmpID" + value="0" /> + <button class="layui-btn layuiadmin-btn-order" type="button" + lay-submit="" lay-filter="btnHEmpID" id="btnHEmpID" + style="padding: 0 10px;float: right;margin-right: 3px;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> </button> </div> </div> <div class="layui-inline"> - <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">璐熻矗浜�*</label> + <label class="layui-form-label" + style="width: 85px;padding: 9px 18px;">璐熻矗浜�*</label> <div class="layui-input-block" style="margin-left: 77px;"> - <input type="text" class="layui-input" lay-verify="HMangerName" name="HMangerName" id="HMangerName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> - <input type="hidden" id="HMangerID" name="HMangerID" lay-verify="HMangerID" value="0" /> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMangerID" id="btnHMangerID" style="padding: 0 10px;float: right;margin-right: 3px;"> + <input type="text" class="layui-input" lay-verify="HMangerName" + name="HMangerName" id="HMangerName" + style="background-color:#efefef4d;width: 60%;display: inline-block;" + readonly> + <input type="hidden" id="HMangerID" name="HMangerID" + lay-verify="HMangerID" value="0" /> + <button class="layui-btn layuiadmin-btn-order" type="button" + lay-submit="" lay-filter="btnHMangerID" id="btnHMangerID" + style="padding: 0 10px;float: right;margin-right: 3px;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> </button> </div> @@ -90,7 +127,18 @@ <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="HRemark" id="HRemark" lay-verify="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" onmouseover="this.title=this.value" style=" width: 500px;"> + <input type="text" class="layui-input" name="HRemark" id="HRemark" + lay-verify="HRemark" placeholder="璇疯緭鍏ュ唴瀹�" + onmouseover="this.title=this.value" style=" width: 500px;"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">缁勭粐</label> + <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> + <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" + class="ForFilteringSchemes" disabled> + <!--鍔ㄦ�佹覆鏌撶粍缁�--> + </select> </div> </div> </div> @@ -103,19 +151,22 @@ <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="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="HMaker" id="HMaker" + style="background-color:#efefef4d;" readonly> </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="hupdater" id="hupdater" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hupdater" id="hupdater" + style="background-color:#efefef4d;" readonly> </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="hchecker" id="hchecker" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hchecker" id="hchecker" + style="background-color:#efefef4d;" readonly> </div> </div> </div> @@ -123,19 +174,22 @@ <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="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" + style="background-color:#efefef4d;" readonly> </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="hupdatedate" id="hupdatedate" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hupdatedate" + id="hupdatedate" style="background-color:#efefef4d;" readonly> </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="hcheckdate" id="hcheckdate" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hcheckdate" id="hcheckdate" + style="background-color:#efefef4d;" readonly> </div> </div> </div> @@ -143,13 +197,15 @@ <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="" id="" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="" id="" + style="background-color:#efefef4d;" readonly> </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="hdeleteman" id="hdeleteman" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hdeleteman" id="hdeleteman" + style="background-color:#efefef4d;" readonly> </div> </div> </div> @@ -157,13 +213,15 @@ <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="" id="" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="" id="" + style="background-color:#efefef4d;" readonly> </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="hdeletedate" id="hdeletedate" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="hdeletedate" + id="hdeletedate" style="background-color:#efefef4d;" readonly> </div> </div> </div> @@ -176,6 +234,7 @@ <div class="layui-btn-container"> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button> + <button type="button" class="layui-btn layui-btn-sm" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> </div> </script> </form> @@ -184,24 +243,28 @@ </div> <script type="text/html" id="barDemo"> - <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>--> - <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> + <!-- <a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a> --> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> </script> <script> + var optionData = [] layui.config({ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ index: 'lib/index' //涓诲叆鍙fā鍧� - }).use(['index', 'form', 'laydate', 'table', 'element'], function () { - - //#region 鍏叡鍙橀噺 - + }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util'], function () { + //#region 鍏敤鍙橀噺 var $ = layui.$ , admin = layui.admin , layer = layui.layer - , table = layui.table , form = layui.form - , element = layui.element; + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + , util = layui.util + , tree = layui.tree + , util = layui.util + , table = layui.table; var HModName = "Sc_MouldUpperBillEdit"; var option = []; //鍒濆琛ㄦ牸鏁版嵁 @@ -219,6 +282,7 @@ var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫 4娣诲姞瀛愬伐鑹鸿矾绾� var linterid = params[params[1]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜 + set_ClearBill(); //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤� @@ -231,7 +295,6 @@ //鍒ゆ柇鏄惁鏂板 if (linterid == null || linterid == 0) { OperationType = 1; - $.ajax({ url: GetWEBURL() + "/Web/GetMAXNum", type: "GET", @@ -243,11 +306,27 @@ } }); } + else if (OperationType == 2) { + RoadBillMain(linterid); + $.ajax({ + url: GetWEBURL() + "/Web/GetMAXNum", + type: "GET", + data: { "HBillType": '3846' }, + success: function (d) { + $("#HInterID").val(d.data[0].HInterID); + $("#HBillNo").val(d.data[0].HBillNo); + $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); + } + }); + ClearMakeMsg() + } else if (OperationType == 3) { //绂佺敤缁勭粐閫夐」 RoadBillMain(linterid); } - + + //鍒濆鍖栫粍缁� + //#endregion @@ -312,6 +391,9 @@ table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓� } break; + //鍒楄缃� + case 'set_HideColumn': get_HideColumnEdit(HModName, sessionStorage["HUserName"], option, table); + break; } }); @@ -343,6 +425,8 @@ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶 function set_ClearBill() { + //鍒濆鍖栫粍缁� + Organ(); //鍒跺崟浜� $("#HMaker").val(sessionStorage["HUserName"]); $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd")); @@ -352,7 +436,8 @@ //鍒濆鍖栧垪琛� function set_InitGrid() { - option = { + let unEditableColStyle = 'background-color: #eeeeee;' + option = { elem: '#mainTable' , toolbar: '#toolbarDemo' , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲� @@ -360,11 +445,11 @@ , height: 650 , cols: [[ //琛ㄥご { type: 'checkbox', totalRowText: '鍚堣琛�' } - , { type: 'numbers', title: '搴忓彿', totalRow: true } + , { type: 'numbers', title: '搴忓彿', totalRow: true, style: unEditableColStyle } , { field: 'HMouldID', title: 'HMouldID', hide: true } , { field: 'HMouldNumber', title: '鍣ㄥ叿浠g爜', edit: 'text', event: "HMouldID" } - , { field: 'HMouldName', title: '鍣ㄥ叿鍚嶇О' } - , { field: 'HMouldModel', title: '鍣ㄥ叿瑙勬牸' } + , { field: 'HMouldName', title: '鍣ㄥ叿鍚嶇О', style: unEditableColStyle } + , { field: 'HMouldModel', title: '鍣ㄥ叿瑙勬牸', style: unEditableColStyle } , { field: 'HQty', title: '鏁伴噺', edit: 'text', totalRow: true } , { field: 'HSourceID', title: 'HSourceID', hide: true } , { field: 'HSourceName', title: '鐢熶骇璧勬簮', edit: 'text', event: "HSourceID" } @@ -402,6 +487,29 @@ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� } , btn2: function (index, layero) { } + }) + } + + //鑾峰彇缁勭粐 + function Organ() { + //鑾峰彇鐧诲綍椤电粍缁囧垪 + $.ajax({ + type: "get", + async: false, + url: GetWEBURL() + "/Web/GetOrganizations", + success: function (result) { + var Organization = ""; + if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + var data = result.data; + for (var i = 0; i < data.length; i++) { + Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; + } + $("#HOrgID").append(Organization); + $("#HOrgID").val(sessionStorage["OrganizationID"]) + form.render('select'); + } + layer.closeAll("loading"); + } }) } @@ -539,23 +647,69 @@ var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹� - if (checkStatus.data.length != 1) { + if (checkStatus.data.length === 0) { return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); } - //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� - obj.update({ - "HMouldID": checkStatus.data[0].hmainid - , "HMouldNumber": checkStatus.data[0].妯″叿缂栧彿 - , "HMouldName": checkStatus.data[0].妯″叿鍚嶇О - , "HMouldModel": checkStatus.data[0].妯″叿鍨嬪彿 - }) + if (checkStatus.data.length === 1) { + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + obj.update({ + "HMouldID": checkStatus.data[0].hmainid + , "HMouldNumber": checkStatus.data[0].妯″叿缂栧彿 + , "HMouldName": checkStatus.data[0].妯″叿鍚嶇О + , "HMouldModel": checkStatus.data[0].妯″叿鍨嬪彿 + }) + } else { + let tableBak = table.cache['mainTable'] + let tempArr = [] + + for (let tableOne of tableBak) { + if (isEmpty(tableOne.HMouldID, true, true) === false) { + tempArr.push(tableOne) + } + } + + for (let checkOne of checkStatus.data) { + tempArr.push({ + "HMouldID": checkOne.hmainid + , "HMouldNumber": checkOne.妯″叿缂栧彿 + , "HMouldName": checkOne.妯″叿鍚嶇О + , "HMouldModel": checkOne.妯″叿鍨嬪彿 + }) + } + debugger + + table.reload('mainTable', { + data: tempArr + }) + } + layer.close(index);//鍏抽棴寮圭獥 + }, + end: function () { + if (isEmpty(optionData) === false) { + obj.update({ + "HMouldID": optionData[0].hmainid + , "HMouldNumber": optionData[0].妯″叿缂栧彿 + , "HMouldName": optionData[0].妯″叿鍚嶇О + , "HMouldModel": optionData[0].妯″叿鍨嬪彿 + }) + optionData = [] + } + + let tableCache = table.cache['mainTable'] + for (tableOne of tableCache) { + if (isEmpty(tableOne.HQty, true, true) === true) { + tableOne.HQty = 1 + } + } + table.reload('mainTable', { + data: tableCache + }) } }) } //鐢熶骇璧勬簮 if (obj.event == "HSourceID") { - //鎵撳紑浜哄憳琛� 灏忕獥浣� layer.open({ type: 2 , skin: "layui-layer-rim" //鍔犱笂杈规 @@ -580,12 +734,19 @@ , "HSourceID": checkStatus.data[0].HItemID }) layer.close(index);//鍏抽棴寮圭獥 + }, end: function () { + if (isEmpty(optionData) === false) { + obj.update({ + "HSourceName": optionData[0].鐢熶骇璧勬簮鍚嶇О + , "HSourceID": optionData[0].HItemID + }) + optionData = [] + } } }) } //鐢熶骇璁㈠崟 if (obj.event == "HICMOInterID") { - //鎵撳紑浜哄憳琛� 灏忕獥浣� layer.open({ type: 2 , skin: "layui-layer-rim" //鍔犱笂杈规 @@ -611,6 +772,15 @@ , "HICMOBillNo": checkStatus.data[0].鍗曟嵁鍙� }) layer.close(index);//鍏抽棴寮圭獥 + }, end: function () { + if (isEmpty(optionData) === false) { + obj.update({ + "HICMOInterID": optionData[0].hmainid + , "HICMOEntryID": optionData[0].HEntryID + , "HICMOBillNo": optionData[0].鍗曟嵁鍙� + }) + optionData = [] + } } }) } @@ -622,7 +792,19 @@ }) } - //缂栬緫 椤甸潰璧嬪�� + // 澶嶅埗 閲嶇疆鍒跺崟淇℃伅 + function ClearMakeMsg() { + $("#hmaker").val(sessionStorage['HMaker']) + $('#hmakedate').val(Format(new Date(), 'yyyy-MM-dd')) + $('#hchecker').val('') + $('#hcheckdate').val('') + $('#hupdater').val('') + $('#hupdatetime').val('') + $('#hdeleteman').val('') + $('#hdeletedate').val('') + } + + //#region 缂栬緫 椤甸潰璧嬪�� 鏈夊弬鏁� function RoadBillMain(linterid)//鍔犺浇琛ㄥご { var sWhere = " and hmainid='" + linterid + "'"; @@ -635,8 +817,8 @@ //涓昏〃 form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫�� - "HBillNo": d.data[0].鍗曟嵁鍙� - , "HInterID": d.data[0].hmainid + "HBillNo": d.data[0].鍗曟嵁鍙� + , "HInterID": d.data[0].hmainid , "HDate": Format(new Date(d.data[0].鏃ユ湡), "yyyy-MM-dd") , "HDeptID": d.data[0].HDeptID , "HDeptName": d.data[0].閮ㄩ棬 @@ -671,6 +853,61 @@ } }) } + //#endregion + + + //#region 缂栬緫 椤甸潰璧嬪�� 鏃犲弬鏁� + function RoadBillMain_SkipArg()//鍔犺浇琛ㄥご + { + var sWhere = " and hmainid='" + linterid + "'"; + $.ajax({ + url: GetWEBURL() + "/Sc_MouldUpperBill/Sc_MouldUpperBillList", + type: "GET", + async: false, + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, + success: function (d) { + + //涓昏〃 + form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫�� + "HBillNo": d.data[0].鍗曟嵁鍙� + , "HInterID": d.data[0].hmainid + , "HDate": Format(new Date(d.data[0].鏃ユ湡), "yyyy-MM-dd") + , "HDeptID": d.data[0].HDeptID + , "HDeptName": d.data[0].閮ㄩ棬 + , "HEmpID": d.data[0].HEmpID + , "HEmpName": d.data[0].鎿嶄綔鍛� + , "HMangerID": d.data[0].HMangerID + , "HMangerName": d.data[0].璐熻矗浜� + , "HRemark": d.data[0].琛ㄥご澶囨敞 + //鍏朵粬淇℃伅 + , "hmaker": d.data[0].鍒跺崟浜� + , "hmakedate": d.data[0].鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(d.data[0].鍒跺崟鏃ユ湡), "yyyy-MM-dd") + , "hchecker": d.data[0].瀹℃牳浜� + , "hcheckdate": d.data[0].瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(d.data[0].瀹℃牳鏃ユ湡), "yyyy-MM-dd") + , "hupdater": d.data[0].淇敼浜� + , "hupdatedate": d.data[0].淇敼鏃ユ湡 == null ? "" : Format(new Date(d.data[0].淇敼鏃ユ湡), "yyyy-MM-dd") + , "hdeleteman": d.data[0].浣滃簾浜� + , "hdeletedate": d.data[0].浣滃簾鏃ユ湡 == null ? "" : Format(new Date(d.data[0].浣滃簾鏃ユ湡), "yyyy-MM-dd") + }); + Organ() + form.render('select') + + //瀛愯〃 璧嬪�� + var rowdata = []; + for (var i = 0; i < d.data.length; i++) { + rowdata.push( + { + "HMouldID": d.data[i].HMouldID, "HMouldNumber": d.data[i].妯″叿缂栫爜, "HMouldName": d.data[i].妯″叿鍚嶇О, "HMouldModel": d.data[i].妯″叿瑙勬牸, "HQty": d.data[i].鏁伴噺 + , "HSourceID": d.data[i].HSourceID, "HSourceName": d.data[i].鐢熶骇璧勬簮, "HICMOInterID": d.data[i].HICMOInterID, "HICMOEntryID": d.data[i].HICMOEntryID, "HICMOBillNo": d.data[i].HICMOBillNo + } + ) + } + option.data = rowdata; + table.render(option); + } + }) + } + //#endregion //淇濆瓨HMaker function set_AddNew(data) { @@ -683,7 +920,7 @@ } } - data.field.HOrgID = sessionStorage["OrganizationID"];//缁勭粐 + // data.field.HOrgID = sessionStorage["OrganizationID"];//缁勭粐 var sMainStr = JSON.stringify(data.field); var sSubStr = JSON.stringify(num); var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"]; @@ -733,11 +970,11 @@ layer.msg("璐熻矗浜烘病鏈夐�夋嫨!"); return false; } - + for (var i = 0; i < option.data.length; i++) { if (option.data[i] != "") { - + //妯″叿涓嶄负绌� if (option.data[i]["HMouldID"] == "0") { layer.msg("绗�" + (i + 1) + "琛�:妯″叿涓嶈兘涓虹┖!"); @@ -760,7 +997,7 @@ layer.msg("绗�" + (i + 1) + "琛�:鏁伴噺涓嶈兘涓�0!"); return false; } - + } } return true; @@ -780,9 +1017,22 @@ } else if (TypeNum == 2) { $("#HMangerName").val(obj[0].鑱屽憳鍚嶇О); $("#HMangerID").val(obj[0].HItemID); - } + } + } + + function GetMouldFileValue(data) { + optionData = data + } + + function GetGySource(data) { + optionData = data + } + + function GetICMOBillValue(data) { + optionData = data } </script> </body> + </html> \ No newline at end of file diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillList.html" index 45ea54e..884401c 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\344\270\212\346\250\241\345\215\225/Sc_MouldUpperBillList.html" @@ -1,5 +1,6 @@ 锘�<!DOCTYPE html> <html> + <head> <meta charset="utf-8" /> <title>涓婃ā鍗曞垪琛�</title> @@ -16,6 +17,7 @@ <script src="../../../layuiadmin/SetColumn.js"></script> <script src="../../../layuiadmin/HideButton_New.js"></script> </head> + <body> <div class="layui-fluid"> <div class="layui-col-md12"> @@ -32,81 +34,80 @@ <div class="layui-inline"> <label class="layui-form-label">鏃ユ湡闂撮殧</label> <div class="layui-input-block"> - <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;"> + <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" + lay-filter="HInitTimeCycle" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> <label class="layui-form-label" style="width: 85px;">寮�鏃ユ湡</label> <div class="layui-input-inline"> - <input type="date" class="layui-input ForFilteringSchemes" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> + <input type="date" class="layui-input ForFilteringSchemes" name="HBeginDate" + id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" + placeholder="yyyy-MM-dd"> </div> </div> <div class="layui-inline"> <label class="layui-form-label" style="width: 85px;">缁撴潫鏃ユ湡</label> <div class="layui-input-inline"> - <input type="date" class="layui-input ForFilteringSchemes" name="HEndDate" id="HEndDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> + <input type="date" class="layui-input ForFilteringSchemes" name="HEndDate" + id="HEndDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" + placeholder="yyyy-MM-dd"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">鍗曟嵁鍙�:</label> <div class="layui-input-inline"> - <input class="layui-input ForFilteringSchemes" name="HBillNo" lay-verify="HBillNo" id="HBillNo" autocomplete="off"> + <input class="layui-input ForFilteringSchemes" name="HBillNo" + lay-verify="HBillNo" id="HBillNo" autocomplete="off"> </div> </div> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">鏌ヨ</button> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" + lay-filter="btnSearch" id="btnSearch">鏌ヨ</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" + lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button> <!--鏄剧ず褰撳墠杩囨护鏂规--> <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 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:5px"> + <div class="lay-row" style="margin: 5px 0;"> <div class="layui-inline"> - <label class="layui-form-label">杩囨护</label> - <div class="layui-input-block"> - <select name="ColName" id="ColName" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;"> + <label class="layui-form-label" style="width: 85px;">缁勭粐</label> + <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> + <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" + class="ForFilteringSchemes"> + <!--鍔ㄦ�佹覆鏌撶粍缁�--> </select> </div> - </div> - <div class="layui-inline"> - <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;"> - <option value="0" selected="selected"></option> - <option value="=">=</option> - <option value=">=">>=</option> - <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> - <option value="7">鍖呭惈</option> - <option value="8">宸﹀寘鍚�</option> - <option value="9">鍙冲寘鍚�</option> - <option value="10">涓嶅寘鍚�</option> - </select> - </div> - <div class="layui-inline"> - <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent"> </div> </div> <div class="layui-row" style="margin-top:5px"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;"> + <select name="ColName" id="ColName" class="ForFilteringSchemes" + lay-filter="ColName" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;"> + <select name="Comparator" id="Comparator" class="ForFilteringSchemes" + lay-filter="Comparator" style="width:190px;"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> <option value="7">鍖呭惈</option> <option value="8">宸﹀寘鍚�</option> <option value="9">鍙冲寘鍚�</option> @@ -114,26 +115,33 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input" value="" name="ColContent1" id="ColContent1"> + <input type="text" class="layui-input ForFilteringSchemes" value="" + name="ColContent" id="ColContent"> </div> </div> <div class="layui-row" style="margin-top:5px"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;"> + <select name="ColName1" id="ColName1" lay-filter="ColName1" + class="ForFilteringSchemes" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;"> + <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" + class="ForFilteringSchemes" style="width:190px;"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> <option value="7">鍖呭惈</option> <option value="8">宸﹀寘鍚�</option> <option value="9">鍙冲寘鍚�</option> @@ -141,7 +149,42 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input" value="" name="ColContent2" id="ColContent2"> + <input type="text" class="layui-input ForFilteringSchemes" value="" + name="ColContent1" id="ColContent1"> + </div> + </div> + <div class="layui-row" style="margin-top:5px"> + <div class="layui-inline"> + <label class="layui-form-label">杩囨护</label> + <div class="layui-input-block"> + <select name="ColName2" id="ColName2" lay-filter="ColName2" + class="ForFilteringSchemes" style="width:190px;"> + </select> + </div> + </div> + <div class="layui-inline"> + <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" + class="ForFilteringSchemes" style="width:190px;"> + <option value="0" selected="selected"></option> + <option value="=">=</option> + <option value=">=">>=</option> + <option value=">">></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> + <option value="7">鍖呭惈</option> + <option value="8">宸﹀寘鍚�</option> + <option value="9">鍙冲寘鍚�</option> + <option value="10">涓嶅寘鍚�</option> + </select> + </div> + <div class="layui-inline"> + <input type="text" class="layui-input ForFilteringSchemes" value="" + name="ColContent2" id="ColContent2"> </div> </div> </div> @@ -153,7 +196,9 @@ <div class="layui-btn-container" id="toolbarDemo_ButtonSet"> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_AddNew" lay-event="set_AddNew"><i class="layui-icon layui-icon-form"></i>鏂板</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_ShowBill" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Copy" id="btn-Copy"><i class="layui-icon layui-icon-transfer"></i>澶嶅埗</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_DeleteBill" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-form"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Export" id="btn-Export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button> <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button> @@ -175,6 +220,7 @@ </div> </div> </body> + </html> <script> var treeCkData = { id: 0 }; @@ -185,7 +231,7 @@ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ index: 'lib/index', //涓诲叆鍙fā鍧� - }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util','soulTable'], function () { + }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'soulTable'], function () { //#region 鍏敤鍙橀噺 var $ = layui.$ , admin = layui.admin @@ -215,7 +261,7 @@ var HModuleType = "3846"; //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType); - //#endregion + //#endregion //杩囨护鏉′欢鐨刢lass绫� var HClassTag = "ForFilteringSchemes"; @@ -243,9 +289,14 @@ case 'set_ShowBill': set_ShowBill(); break; + //澶嶅埗 + case 'btn-Copy': set_CopyBill(); + break; //鍒犻櫎 - case 'set_DeleteBill': - set_DeleteBill(); + case 'set_DeleteBill': set_DeleteBill(); + break; + //瀵煎嚭 + case 'btn-Export': get_Export(); break; //瀹℃牳 case 'set_CheckBill': @@ -297,6 +348,14 @@ }; }); + //琛ㄦ牸鑷畾涔変簨浠� + table.on('tool(mainTable)', function (obj) { + let data = obj.data + switch (obj.event) { + case "onHBillNumberClickHandler": onHBillNumberClickHandler(data); break; + } + }) + //鏌ヨ form.on('submit(btnSearch)', function (data) { if (page != 1) { @@ -305,7 +364,7 @@ get_FastQuery(); } }); - + // 閲嶇疆鎸夐挳 form.on('submit(btnReSearch)', function (data) { set_ClearQuery(); @@ -336,6 +395,8 @@ //鍒濆鍖栨煡璇� function set_ClearBill() { + // 鍒濆鍖栫粍缁� + Organ() set_InitGrid(); //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规 get_DefaultModule(); @@ -360,7 +421,7 @@ option = { elem: '#mainTable' , toolbar: '#toolbarDemo' - , height: 450 + , height: 'full-130' , page: false , cellMinWidth: 90 , limit: 50 @@ -430,7 +491,16 @@ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); break; default: - col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + if (data[i].name === '鍗曟嵁鍙�') { + col.push({ + field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, + templet: function (d) { + return '<span style="color: blue;" lay-unrow >' + d.鍗曟嵁鍙� + '</span>' + }, style: 'cursor: pointer;', event: 'onHBillNumberClickHandler' + }); + } else { + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } } } } @@ -448,8 +518,9 @@ ins = table.render(option); layer.close(ajaxLoad); - if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { + if ($("#ColName option").length < 1) { ColFilter(); + get_DefaultModule() } //鍒锋柊鎸夐挳鏄剧ず @@ -469,7 +540,7 @@ //蹇�熻繃婊� function get_FastQuery() { - + var HBeginDate = $("#HBeginDate").val();//璧峰鏃ユ湡 var HEndDate = $("#HEndDate").val();//鎴鏃ユ湡 var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙� @@ -552,7 +623,7 @@ sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'"; } if (HBeginDate != "" && HEndDate != "") { - sWhere += "and 鏃ユ湡 between '" + HBeginDate + "' and '" + HEndDate+"'"; + sWhere += "and 鏃ユ湡 between '" + HBeginDate + "' and '" + HEndDate + "'"; } if (GetDataCols != "") { sWhere += GetDataCols; @@ -680,6 +751,7 @@ //鍒犻櫎 function set_DeleteBill() { + debugger var checkStatus = table.checkStatus('mainTable') , data = checkStatus.data; if (checkStatus.data.length > 0) { @@ -693,7 +765,7 @@ $.ajax({ type: "GET", url: GetWEBURL() + "/Sc_MouldUpperBill/DeltetSc_MouldUpperBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� - data: { "HInterID": HInterID.toString(), "HPRDORGID": sessionStorage["OrganizationID"], "user": sessionStorage["HUserName"]}, + data: { "HInterID": HInterID.toString(), "HPRDORGID": sessionStorage["OrganizationID"], "user": sessionStorage["HUserName"] }, success: function (result) { if (result.count == 1) { layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { @@ -771,7 +843,7 @@ } }); }) - //#endregion + //#endregion //鍙嶅叧闂�/鍏抽棴鏁版嵁 function set_CloseBill(num) { @@ -868,6 +940,29 @@ get_FastQuery(); } + //鑾峰彇缁勭粐 + function Organ() { + //鑾峰彇鐧诲綍椤电粍缁囧垪 + $.ajax({ + type: "get", + async: false, + url: GetWEBURL() + "/Web/GetOrganizations", + success: function (result) { + var Organization = ""; + if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + var data = result.data; + for (var i = 0; i < data.length; i++) { + Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; + } + $("#HOrgID").append(Organization); + $("#HOrgID").val(sessionStorage["OrganizationID"]) + form.render("select"); + } + layer.closeAll("loading"); + } + }) + } + //#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃 function setSelect_HInitTimeCycle() { var valueList = [0, 1, 2, 3, 4, 5, 6, 29]; @@ -884,8 +979,8 @@ $("#HInitTimeCycle").val("29"); } - //#endregion - + //#endregion + //鑾峰彇褰撳墠鐢ㄦ埛鐨勯粯璁よ繃婊ゆ柟妗� function get_DefaultModule() { $.ajax({ @@ -949,6 +1044,7 @@ }); } + //淇濆瓨鏂规 function set_SaveScheme() { var index = layer.open() @@ -956,7 +1052,6 @@ var HIsClose_Manual = false; //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�) var Filter = document.getElementsByClassName(HClassTag); - var HFilterIdList = "";//杩囨护鏉′欢 var HFilterIdLists = "";//鎷兼帴澶氫釜杩囨护鏉′欢 var HValue = "";//杩囨护鍊� @@ -1069,6 +1164,24 @@ } + // 澶嶅埗 + function set_CopyBill() { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var linterid = data[0].hmainid; + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '澶嶅埗' + HPageTitle + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../../妯℃不鍏风鐞�/涓婃ā鍗�/Sc_MouldUpperBillEdit.html?OperationType=2&linterid=' + linterid + '&HEntryID=&HSouceBillType=3846' + }) + } else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹鍒讹紒'); + } + } + //璇诲彇鏂规 function set_ReadScheme() { var HIsClose_Manual = false; @@ -1095,6 +1208,54 @@ , title: '杩囨护鏂规鍒楄〃' , shift: 0//寮瑰嚭鍔ㄧ敾 , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName + , btn: ['纭', '鍙栨秷'], + btn1: function (index, laero) { + //鎸夐挳涓� 鐨勫洖璋� + var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹� + + if (checkStatus.data.length !== 1) { + return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + let hmainid = checkStatus.data[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].HInterID + //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢 + 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); + } + } + + layer.close(index);//鍏抽棴寮圭獥 + + } else { + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + + }, + btn2: function () { + HIsClose_Manual = true; + } , cancel: function () { // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫 HIsClose_Manual = true; @@ -1180,11 +1341,85 @@ $("#ColName2").append(Organization); form.render('select'); } - //#endregion + //#endregion + + //#region 鑷畾涔変簨浠剁洃鍚� + function onHBillNumberClickHandler(data) { + var linterid = data.hmainid; + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '缂栬緫' + HPageTitle + , shift: 0//寮瑰嚭鍔ㄧ敾 + , content: '../../妯℃不鍏风鐞�/涓婃ā鍗�/Sc_MouldUpperBillEdit.html?OperationType=3&linterid=' + linterid + '&HEntryID=&HSouceBillType=3846' + }) + } + //#endregion + + //#region 瀵煎嚭Execel + function get_Export() { + var ModRightNameCheck = "Sc_MouldUpperBill_ExportExcel"; + + //閫昏緫瀹℃牳鏂规硶 + $.ajax({ + type: "GET", + url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.count == 1) { + table.exportFile(ins.config.id, option.data, "xls"); + } else { + layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 }); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + //#endregion //浠ヤ笂鏄痩ayui妯″潡 }); function GetDataCol(data) { GetDataCols = data; } + + //#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].HInterID + //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢 + 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 </script> \ No newline at end of file diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillEdit.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillEdit.html" index ed312c8..15adb19 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillEdit.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillEdit.html" @@ -301,7 +301,7 @@ <label class="layui-form-label" style="width: 65px;">缁勭粐</label> <div class="layui-input-block" style="margin-left: 100px; width: 185px;"> <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" - class="ForFilteringSchemes"> + class="ForFilteringSchemes" disabled> <!--鍔ㄦ�佹覆鏌撶粍缁�--> </select> </div> @@ -473,7 +473,7 @@ </script> <script> - + var optionData = [] layui.config({ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ @@ -534,14 +534,14 @@ , height: 400 , cols: [[ //琛ㄥご { type: 'checkbox', totalRowText: '鍚堣琛�' } - , { type: 'numbers', title: '搴忓彿', totalRow: true, style: "background-color: #eeeeee;"} - , { field: '瀛愮淮淇」鐩唬鐮�', title: '缁翠慨椤圭洰浠g爜',edit: 'text', event: "HRepairID" } + , { type: 'numbers', title: '搴忓彿', totalRow: true, style: "background-color: #eeeeee;" } + , { field: '瀛愮淮淇」鐩唬鐮�', title: '缁翠慨椤圭洰浠g爜', edit: 'text', event: "HRepairID" } , { field: '瀛愮淮淇」鐩�', title: '缁翠慨椤圭洰', style: "background-color: #eeeeee;" } , { field: 'HRepairID', title: '缁翠慨椤圭洰id', hide: true } , { field: 'HRepairExplanation', title: '缁翠慨瑕佹眰', edit: 'text' } , { field: '瀛愯礋璐d汉浠g爜', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: "HManagerID" }//, hide: true , { field: 'HManagerID', title: 'id', width: 115, hide: true }//, hide: true - , { field: '瀛愯礋璐d汉', title: '璐熻矗浜�', width: 115, style: "background-color: #eeeeee;"} + , { field: '瀛愯礋璐d汉', title: '璐熻矗浜�', width: 115, style: "background-color: #eeeeee;" } , { field: 'HMoney', title: '缁翠慨璐圭敤', edit: 'text' } , { field: 'HRemark', title: '澶囨敞', edit: 'text' } , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } @@ -783,7 +783,7 @@ $("#HMainSourceBillType").val(checkStatus.data[0].鍗曟嵁绫诲瀷);//婧愬崟绫诲瀷 $("#HMainSourceBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);//婧愬崟鍚嶇О $("#HMainSourceInterID").val(checkStatus.data[0].hmainid); // 婧愬崟id - $("#HMainSourceEntryID").val(obj[0].hsubid); //婧愬崟瀛恑d + $("#HMainSourceEntryID").val(checkStatus.data[0].hsubid); //婧愬崟瀛恑d //鍏抽棴椤甸潰 layer.close(index); @@ -944,6 +944,16 @@ , "瀛愮淮淇」鐩唬鐮�": checkStatus.data[0].缁翠慨椤圭洰浠g爜 }) layer.close(index);//鍏抽棴寮圭獥 + }, + end: function () { + if (isEmpty(optionData) === false) { + obj.update({ + "瀛愮淮淇」鐩�": optionData[0].缁翠慨椤圭洰 + , "HRepairID": optionData[0].hitemid + , "瀛愮淮淇」鐩唬鐮�": optionData[0].缁翠慨椤圭洰浠g爜 + }) + optionData = [] + } } }) } @@ -964,7 +974,7 @@ //鎸夐挳涓� 鐨勫洖璋� var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹� - + debugger if (checkStatus.data.length != 1) { return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); } @@ -975,6 +985,15 @@ , "瀛愯礋璐d汉浠g爜": checkStatus.data[0].鑱屽憳浠g爜 }) layer.close(index);//鍏抽棴寮圭獥 + }, end: function () { + if (isEmpty(optionData) === false) { + obj.update({ + "瀛愯礋璐d汉": optionData[0].鑱屽憳鍚嶇О + , "HManagerID": optionData[0].HItemID + , "瀛愯礋璐d汉浠g爜": optionData[0].鑱屽憳浠g爜 + }) + optionData = [] + } } }) } @@ -1149,6 +1168,11 @@ layer.msg("瀹為檯缁翠慨宸ユ椂涓嶈兘涓�0"); return false; } + + if (isEmpty($("#HMainSourceInterID").val()) === true) { + layer.msg('鍐呴儴鍗曟嵁鍙蜂笉鑳戒负绌�'); + return false; + } //if ($("#HSupIDName").val() == "") { // layer.msg("渚涘簲鍟嗕笉鑳戒负绌�"); // return false; @@ -1256,6 +1280,15 @@ $("#HMainSourceEntryID").val(obj[0].hsubid); //婧愬崟瀛恑d } + // 瀛樺湪鍚岀璋冪敤鐨勫洖璋冨嚱鏁帮紝鍙兘瀛樺湪涓�涓� + // function GetRepairValue(data) { + // optionData = data + // } + + // function GetHEmpValue(data) { + // optionData = data + // } + </script> </body> diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\345\205\267\347\212\266\346\200\201\345\210\206\346\236\220/Sc_MouldStatusAnalysis.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\345\205\267\347\212\266\346\200\201\345\210\206\346\236\220/Sc_MouldStatusAnalysis.html" new file mode 100644 index 0000000..1365e48 --- /dev/null +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\345\205\267\347\212\266\346\200\201\345\210\206\346\236\220/Sc_MouldStatusAnalysis.html" @@ -0,0 +1,186 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8" /> + <title>璁惧鐘舵�佸垎甯�</title> + <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> + <script src="../../../layuiadmin/layui/layui.js"></script> + <script src="../../../layuiadmin/layui/layui.js"></script> + <script src="../../../layuiadmin/Scripts/json2.js"></script> + <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> + <script src="../../../layuiadmin/Scripts/webConfig.js"></script> + <script src="../../../layuiadmin/layui/layui1.js"></script> + <script src="../../../layuiadmin/echarts.min.js"></script> + <link href="../../../layuiadmin/layui/css/ReportPlatform.css" rel="stylesheet" /> +</head> + +<body> + <div class="layui-fluid"> + <div class="layui-col-md12"> + <div class="layui-card" style="padding: 1px"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="component-form-group"> + <div class="layui-row"> + <div class="layui-col-xs2 layui-inline" style="border: solid 1.5px #e0d6d64d;"> + <div id="TreeTable" class="demo-tree demo-tree-box" + style="height: 600px; overflow: scroll;"></div> + </div> + <div class="layui-col-xs9 layui-inline" style="border: solid 1.5px #e0d6d64d;"> + <div id="btomleft" style="height:600px;display:block;overflow-y:auto;"> + </div> + </div> + <div class="layui-col-xs1 layui-inline" style="border: solid 1.5px #e0d6d64d;"> + <fieldset + style="border: 1px solid #eee; box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); height: 585px;"> + <legend style="color: #5FB878">鎿嶄綔鍙�</legend> + <div class="content4"> + <div class="layui-row layui-col-space10"> + <div class="layui-col-sm12 " onclick="PowerOn(event,this)"> + <div class="cnt bottomright"> + <div class="btnM"> + <span class="layui-icon layui-icon-pause imgicon"></span> + </div> + <span class="imgtitle">寮�鏈�</span> + </div> + </div> + </div> + <div class="layui-row layui-col-space10"> + <div class="layui-col-sm12 " onclick="PowerOff(event,this)"> + <div class="cnt bottomright"> + <div class="btnM"> + <span class="layui-icon layui-icon-logout imgicon"></span> + </div> + <span class="imgtitle">鍋滄満</span> + </div> + </div> + </div> + <div class="layui-row layui-col-space10"> + <div class="layui-col-sm12 " onclick="DotCheck(event,this)"> + <div class="cnt bottomright"> + <div class="btnM"> + <span class="layui-icon layui-icon-list imgicon"></span> + </div> + <span class="imgtitle">鐐规璁板綍</span> + </div> + </div> + </div> + <div class="layui-row layui-col-space10"> + <div class="layui-col-sm12 " onclick="FaultRegistration(event,this)"> + <div class="cnt bottomright"> + <div class="btnM"> + <span class="layui-icon layui-icon-list imgicon"></span> + </div> + <span class="imgtitle">鏁呴殰鐧昏</span> + </div> + </div> + </div> + <div class="layui-row layui-col-space10"> + <div class="layui-col-sm12 " onclick="Maintenance(event,this)"> + <div class="cnt bottomright"> + <div class="btnM"> + <span class="layui-icon layui-icon-form imgicon"></span> + </div> + <span class="imgtitle">缁翠慨</span> + </div> + </div> + </div> + + <div class="layui-row layui-col-space10"> + <div class="layui-col-sm12 " onclick="Resume(event,this)"> + <div class="cnt bottomright"> + <div class="btnM"> + <span class="layui-icon layui-icon-table imgicon"></span> + </div> + <span class="imgtitle">灞ュ巻</span> + </div> + </div> + </div> + <div class="layui-row layui-col-space10"> + <div class="layui-col-sm12 " onclick="Process(event,this)"> + <div class="cnt bottomright"> + <div class="btnM"> + <span class="layui-icon layui-icon-file imgicon"></span> + </div> + <span class="imgtitle">宸ヨ壓</span> + </div> + </div> + </div> + <div class="layui-row layui-col-space10"> + <div class="layui-col-sm12 " onclick="HStatus(event,this)"> + <div class="cnt bottomright"> + <div class="btnM"> + <span class="layui-icon layui-icon-set imgicon"></span> + </div> + <span class="imgtitle">鐘舵��</span> + </div> + </div> + </div> + </div> + </fieldset> + </div> + </div> + <div class="layui-row"> + <div class="layui-col-xs3 layui-inline"> + <div class="tr1-1" id="mychart11"> </div> + </div> + <div class="layui-col-xs3 layui-inline"> + <div class="tr1-2" id="mychart22"> </div> + </div> + <div class="layui-col-xs3 layui-inline"> + <div class="tr1-3" id="mychart3"> </div> + </div> + <div class="layui-col-xs3 layui-inline"> + <div class="tr1-4" id="mychart4"> </div> + </div> + </div> + </form> + </div> + </div> + </div> + </div> +</body> + +</html> +<script> + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index', //涓诲叆鍙fā鍧� + }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate', 'tree'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + , tree = layui.tree + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + //鍒濆鍖栫晫闈� + set_ClearBill(); + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + $('#btomleft').on('click', function () { // 鐩戝惉鍗$墖瀹瑰櫒鐐瑰嚮浜嬩欢 + + }) + //#endregion + + //#region 鏈〉闈㈣璋冪敤鐨勬墍鏈夋柟娉� + function set_ClearBill() { + + } + //#endregion + + // 浠ヤ笂鏄痩ayui妯″潡 + }); +</script> \ No newline at end of file diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\345\205\267\347\212\266\346\200\201\345\210\206\346\236\220/Sc_MouldStatusAnalysis_Card.js" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\345\205\267\347\212\266\346\200\201\345\210\206\346\236\220/Sc_MouldStatusAnalysis_Card.js" new file mode 100644 index 0000000..bb1a602 --- /dev/null +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\345\205\267\347\212\266\346\200\201\345\210\206\346\236\220/Sc_MouldStatusAnalysis_Card.js" @@ -0,0 +1,22 @@ +class Sc_MouldStatusAnalysis_Card extends HTMLElement { + static observedAttributes = ["color", "size"]; + constructor() { + super() + } + + connectedCallback() { + console.log("鑷畾涔夊厓绱犳坊鍔犺嚦椤甸潰銆�"); + } + + disconnectedCallback() { + console.log("鑷畾涔夊厓绱犱粠椤甸潰涓Щ闄ゃ��"); + } + + adoptedCallback() { + console.log("鑷畾涔夊厓绱犵Щ鍔ㄨ嚦鏂伴〉闈€��"); + } + + attributeChangedCallback(name, oldValue, newValue) { + console.log(`灞炴�� ${name} 宸插彉鏇淬�俙); + } +} \ No newline at end of file diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBill.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBill.html" index ffc858a..dc1864e 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBill.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBill.html" @@ -1,19 +1,26 @@ 锘�<!DOCTYPE html> <html> + <head> <meta charset="utf-8" /> <title>鏂板/缂栬緫鍣ㄥ叿澶勭悊鍑哄簱鍗�</title> <meta name="renderer" content="webkit"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <meta name="viewport" + content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> <style type="text/css"> .layui-form-label { width: 85px; } + + .custom-hidden { + display: none; + } </style> </head> + <body> <div id="layout1" class="layui-fluid"> @@ -24,10 +31,16 @@ <div class="layui-card-header"> <div class="layui-btn-group"> - <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button> - <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button> - <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="view">棰勮</button> - <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="print">鎵撳嵃</button> + <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" + lay-submit="" lay-filter="Saver">淇濆瓨</button> + <button type="button" id="check-btn" class="layui-btn layui-btn-normal layui-btn-radius" + lay-submit="" lay-filter="Checker">瀹℃牳</button> + <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" + lay-filter="Exit">閫�鍑�</button> + <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" + lay-filter="view">棰勮</button> + <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" + lay-filter="print">鎵撳嵃</button> </div> @@ -39,14 +52,19 @@ <li class="layui-this">鍩烘湰淇℃伅</li>--> <!--<li>鍏朵粬淇℃伅</li>--> <!--</ul>--> - <h1 style="text-align:center;"><b>鍣ㄥ叿澶勭悊鍑哄簱鍗�</b></h1> <div class="layui-tab-content"> + <h1 style="text-align:center;"><b>鍣ㄥ叿缁翠慨璁板綍鍗�</b></h1> + <ul class="layui-tab-title" lay-filter="tab-all"> + <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li> + <li lay-id="2" style="padding:1px;">鍒跺崟淇℃伅</li> + </ul> <div class="layui-tab-item layui-show"> <div class="layui-form-item"> <div class="layui-inline"> <label class="layui-form-label">鍗曟嵁鍙�</label> <div class="layui-input-inline"> - <input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" readonly="readonly" autocomplete="off"> + <input class="layui-input" name="HBillNo" lay-verify="HBillNo" + id="HBillNo" readonly="readonly" autocomplete="off"> <input id="HInterID" name="HInterID" type="hidden" /> <input id="HMaker" name="HMaker" type="hidden" /><!--鍒跺崟浜�--> </div> @@ -54,55 +72,94 @@ <div class="layui-inline"> <label class="layui-form-label">鏃ユ湡</label> <div class="layui-input-inline"> - <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> + <input class="layui-input" name="HDate" id="HDate" + autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" + placeholder="yyyy-MM-dd"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">鍐呴儴鍗曟嵁鍙�</label> <div class="layui-input-inline"> - <input type="text" name="HInnerBillNo" id="HInnerBillNo" class="layui-input"> + <input type="text" name="HInnerBillNo" id="HInnerBillNo" + class="layui-input"> </div> </div> </div> <div class="layui-form-item"> <div class="layui-inline"> - <label class="layui-form-label">璐熻矗浜�<label style="color:red"> * </label></label> + <label class="layui-form-label">璐熻矗浜�<label style="color:red"> * + </label></label> <div class="layui-input-inline"> - <input type="text" name="HManagerName" id="HManagerName" readonly class="layui-input" value="" style="float:left;width:150px;"> - <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="" style="float:left;width:150px;"> - <button type="button" lay-submit="" class="layui-btn" lay-filter="ZRPerson" style="width:40px;"> - <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> + <input type="text" name="HManagerName" id="HManagerName" readonly + class="layui-input" value="" style="float:left;width:150px;"> + <input type="hidden" name="HManagerID" id="HManagerID" + class="layui-input" value="" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" + lay-filter="ZRPerson" style="width:40px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn" + style="margin-left:-9px;"></i> </button> </div> </div> <div class="layui-inline"> - <label class="layui-form-label">浠撳簱<label style="color:red"> * </label></label> + <label class="layui-form-label">浠撳簱<label style="color:red"> * + </label></label> <div class="layui-input-inline"> - <input type="text" name="HWHName" id="HWHName" readonly class="layui-input" value="" style="float:left;width:150px;"> - <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="" style="float:left;width:150px;"> - <input type="hidden" name="HWHNumber" id="HWHNumber" class="layui-input" value="" style="float:left;width:150px;"> - <button type="button" lay-submit="" class="layui-btn" lay-filter="WareHouse" style="width:40px;"> - <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> + <input type="text" name="HWHName" id="HWHName" readonly + class="layui-input" value="" style="float:left;width:150px;"> + <input type="hidden" name="HWHID" id="HWHID" class="layui-input" + value="" style="float:left;width:150px;"> + <input type="hidden" name="HWHNumber" id="HWHNumber" + class="layui-input" value="" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" + lay-filter="WareHouse" style="width:40px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn" + style="margin-left:-9px;"></i> </button> </div> </div> <div class="layui-inline"> - <label class="layui-form-label">鍙戣揣鍛�<label style="color:red"> * </label></label> + <label class="layui-form-label">鍙戣揣鍛�<label style="color:red"> * + </label></label> <div class="layui-input-inline"> - <input type="text" name="HKeeperName" id="HKeeperName" readonly class="layui-input" value="" style="float:left;width:150px;"> - <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="" style="float:left;width:150px;"> - <button type="button" lay-submit="" class="layui-btn" lay-filter="FHPerson" style="width:40px;"> - <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> + <input type="text" name="HKeeperName" id="HKeeperName" readonly + class="layui-input" value="" style="float:left;width:150px;"> + <input type="hidden" name="HKeeperID" id="HKeeperID" + class="layui-input" value="" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" + lay-filter="FHPerson" style="width:40px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn" + style="margin-left:-9px;"></i> </button> </div> </div> <div class="layui-inline"> - <label class="layui-form-label">閮ㄩ棬<label style="color:red"> * </label></label> + <label class="layui-form-label">楠屾敹鍛�<label style="color:red"> * + </label></label> <div class="layui-input-inline"> - <input type="text" name="HDeptName" id="HDeptName" readonly class="layui-input" value="" style="float:left;width:150px;"> - <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="" style="float:left;width:150px;"> - <button type="button" lay-submit="" class="layui-btn" lay-filter="Department" style="width:40px;"> - <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> + <input type="text" name="HSecManagerName" id="HSecManagerName" readonly + class="layui-input" value="" style="float:left;width:150px;"> + <input type="hidden" name="HSecManagerID" id="HSecManagerID" + class="layui-input" value="" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" + lay-filter="SMPerson" style="width:40px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn" + style="margin-left:-9px;"></i> + </button> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">閮ㄩ棬<label style="color:red"> * + </label></label> + <div class="layui-input-inline"> + <input type="text" name="HDeptName" id="HDeptName" readonly + class="layui-input" value="" style="float:left;width:150px;"> + <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" + value="" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" + lay-filter="Department" style="width:40px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn" + style="margin-left:-9px;"></i> </button> </div> </div> @@ -111,7 +168,8 @@ <div class="layui-inline"> <label class="layui-form-label">寰�鏉ョ被鍨�</label> <div class="layui-input-inline"> - <select name="HSupTypeID" id="HSupTypeID" class="layui-input" lay-filter="HSupTypeID" value="" style="float:left;width:150px"> + <select name="HSupTypeID" id="HSupTypeID" class="layui-input" + lay-filter="HSupTypeID" value="" style="float:left;width:150px"> <option value="1">渚涘簲鍟�</option> <option value="2">瀹㈡埛</option> <option value="3">杞﹂棿閮ㄩ棬</option> @@ -121,23 +179,29 @@ <div class="layui-inline"> <label class="layui-form-label">寰�鏉ュ崟浣�</label> <div class="layui-input-inline"> - <input type="text" name="HSupName" id="HSupName" readonly class="layui-input" value="" style="float:left;width:150px;"> - <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float:left;width:150px;"> - <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;"> - <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> + <input type="text" name="HSupName" id="HSupName" readonly + class="layui-input" value="" style="float:left;width:150px;"> + <input type="hidden" name="HSupID" id="HSupID" class="layui-input" + value="0" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" + lay-filter="HSupList" style="width:40px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn" + style="margin-left:-9px;"></i> </button> </div> </div> - <div class="layui-inline"> + <div class="layui-inline custom-hidden"> <label class="layui-form-label">婧愬崟绫诲瀷</label> <div class="layui-input-inline"> - <input type="text" name="HSourceBillType" id="HSourceBillType" class="layui-input" value="" style="float:left;width:100%;"> + <input type="text" name="HSourceBillType" id="HSourceBillType" + class="layui-input" value="" style="float:left;width:100%;"> </div> </div> - <div class="layui-inline"> + <div class="layui-inline custom-hidden"> <label class="layui-form-label">閫夊崟鍙�</label> <div class="layui-input-inline"> - <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:100%;"> + <input type="text" name="XDH" id="XDH" class="layui-input" value="" + style="float:left;width:100%;"> </div> </div> </div> @@ -146,13 +210,106 @@ <div class="layui-inline"> <label class="layui-form-label">鎽樿</label> <div class="layui-input-inline"> - <textarea placeholder="璇疯緭鍏ユ憳瑕�" class="layui-textarea" name="HExplanation" id="HExplanation"></textarea> + <textarea placeholder="璇疯緭鍏ユ憳瑕�" class="layui-textarea" + name="HExplanation" id="HExplanation"></textarea> </div> </div> <div class="layui-inline"> <label class="layui-form-label">澶囨敞</label> <div class="layui-input-inline"> - <textarea placeholder="璇疯緭鍏ョ淮澶囨敞" class="layui-textarea" name="HRemark" id="HRemark"></textarea> + <textarea placeholder="璇疯緭鍏ョ淮澶囨敞" class="layui-textarea" name="HRemark" + id="HRemark"></textarea> + </div> + </div> + + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">缁勭粐</label> + <div class="layui-input-block" + style="margin-left: 120px; width: 185px;"> + <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" + class="ForFilteringSchemes" disabled> + <!--鍔ㄦ�佹覆鏌撶粍缁�--> + </select> + </div> + </div> + </div> + </div> + <!--鍒跺崟淇℃伅--> + <div class="layui-tab-item"> + <div class="layui-form-item"> + <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="HMaker" id="HMaker" + style="background-color:#efefef4d;" readonly> + </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="HChecker" id="HChecker" + style="background-color:#efefef4d;" readonly> + </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="HCloseMan" + id="HCloseMan" style="background-color:#efefef4d;" readonly> + </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="HUpDater" id="HUpDater" + style="background-color:#efefef4d;" readonly> + </div> + </div> + + </div> + <div class="layui-form-item"> + <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="HMakeDate" + id="HMakeDate" style="background-color:#efefef4d;" readonly> + </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="HCheckDate" + id="HCheckDate" style="background-color:#efefef4d;" readonly> + </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="HCloseDate" + id="HCloseDate" style="background-color:#efefef4d;" readonly> + </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="HUpDateDate" + id="HUpDateDate" style="background-color:#efefef4d;" readonly> + </div> + </div> + </div> + <div class="layui-form-item"> + <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="HDeleteMan" + id="HDeleteMan" style="background-color:#efefef4d;" readonly> + </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="HDeleteDate" + id="HDeleteDate" style="background-color:#efefef4d;" readonly> </div> </div> </div> @@ -194,7 +351,7 @@ </div> <script type="text/html" id="barDemo"> <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>--> - <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a> </script> <script src="../../../layuiadmin/layui/layui.js"></script> <script src="../../../layuiadmin/layui/layui.js"></script> @@ -205,6 +362,7 @@ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> <script src="../../../layuiadmin/PageTitle.js"></script> <script src="../../../layuiadmin/SetColumn.js"></script> + <script src="../../../layuiadmin/common.js"></script> <script> //鑾峰彇椤甸潰璺宠浆鍙傛暟 var params = get_UrlVars(); @@ -223,7 +381,7 @@ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ index: 'lib/index' //涓诲叆鍙fā鍧� - }).use(['index', 'form', 'laydate', 'table', 'element'], function () { + }).use(['index', 'form', 'laydate', 'table', 'element', 'util'], function () { //#region 鍏敤鍙橀噺 var $ = layui.$ @@ -232,7 +390,8 @@ , table = layui.table , form = layui.form , laydate = layui.laydate - , element = layui.element; + , element = layui.element + , util = layui.util; var option; var sBillType = "3832"; var HModName = "Sc_MouldScrapOutBillEdit"; @@ -261,10 +420,26 @@ //鍒ゆ柇鎿嶄綔绫诲瀷 if (OperationType == 1) {//鏃犳簮鍗� set_AddFNew(); + init_BillStatus(0) + } + if (OperationType == 2) {//鏃犳簮鍗� + set_EditFromGrid(); + set_AddFNew(); + $("#HMakeDate").val('') + $("#HMaker").val(sessionStorage['HMaker']) + $("#HChecker").val('') + $("#HCheckDate").val('') + $("#HCloseMan").val('') + $("#HCloseDate").val('') + $("#HUpDater").val('') + $("#HUpDateDate").val('') + $("#HDeleteMan").val('') + $("#HDeleteDate").val('') + init_BillStatus(0) } else if (OperationType == 3) {//缂栬緫 - set_EditFromGrid(); + init_BillStatus(1) } else { layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 }); @@ -278,13 +453,13 @@ console.log(type) switch (type) { case '1': - return "../../鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html?Type=HSup";//"SupplierInformation"; + return "../../鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html?Type=HSup&openType=2";//"SupplierInformation"; break; case '2': - return "../../鍩虹璧勬枡/閿�鍞熀纭�璧勬枡/Gy_Customer.html";//"CustomerInformation"; + return "../../鍩虹璧勬枡/閿�鍞熀纭�璧勬枡/Gy_Customer.html?openType=2";//"CustomerInformation"; break; case '3': - return "../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html";//"DeptInformation"; + return "../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html?openType=2";//"DeptInformation"; break; } } @@ -338,6 +513,35 @@ } }); }); + + // 瀹℃牳 + form.on('submit(Checker)', function () { + var InterID = linterid + $.ajax({ + type: "GET", + url: GetWEBURL() + "/Sc_MouldScrapOutHouseBill/AuditMouldScrapOutHouseBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + data: { "HInterID": InterID, "user": sessionStorage["HUserName"], "flag": 1 }, + success: function (result) { + if (result.count == 1) { + layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { + var index = layer.getFrameIndex(window.name); + $("#add-btn").addClass('layui-btn-disabled').attr('disabled', true) + $("#check-btn").addClass('layui-btn-disabled').attr('disabled', true) + //鍏抽棴褰撳墠frame + layer.close(index); + //淇敼涓哄姛鍚庡埛鏂扮晫闈� + $("#btnSearch").trigger('click'); + }); + + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + }) + //琛ㄥご淇℃伅璐熻矗浜哄脊绐� form.on('submit(ZRPerson)', function () { //椤甸潰灞�-鑷畾涔� @@ -388,7 +592,7 @@ shift: 2, area: ['80%', '80%'], maxmin: true - , content: ['../../../views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Warehouse.html', 'yes'], + , content: ['../../../views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Warehouse.html?OpenType=2', 'yes'], btn: ['纭畾', '鍙栨秷'] , btn1: function (index, layero) { @@ -461,6 +665,46 @@ }); }); + //琛ㄥご淇℃伅楠屾敹鍛樺脊绐� + form.on('submit(SMPerson)', function () { + //椤甸潰灞�-鑷畾涔� + layer.open({ + type: 2, + skin: 'layui-layer-rim', //鍔犱笂杈规 + title: '浜哄憳鍒楄〃', + closeBtn: 1, + shift: 2, + area: ['80%', '80%'], + maxmin: true + , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes'], + btn: ['纭畾', '鍙栨秷'] + , btn1: function (index, layero) { + + //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟 + var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test" + if (checkStatus.data.length === 0) { + return layer.msg('璇烽�夋嫨鏁版嵁'); + } + $("#HSecManagerName").val(checkStatus.data[0].鑱屽憳鍚嶇О); + $("#HSecManagerID").val(checkStatus.data[0].HItemID); + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { + //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟 + //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 + }, + end: function () { + + }, + success: function (layero, index) { + + } + }); + + + }); + //琛ㄥご淇℃伅閮ㄩ棬寮圭獥 form.on('submit(Department)', function () { //椤甸潰灞�-鑷畾涔� @@ -472,7 +716,7 @@ shift: 2, area: ['80%', '80%'], maxmin: true - , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'], + , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html?openType=2', 'yes'], btn: ['纭畾', '鍙栨秷'] , btn1: function (index, layero) { @@ -692,46 +936,50 @@ //鍒濆鍖栬〃鍗曟彃浠� function set_InitFrom() { + // 鍒濆鍖栫粍缁� + Organ() //甯歌鐢ㄦ硶 laydate.render({ elem: '#HDate' - }); + + $("#check-btn").addClass('layui-btn-disabled').attr('disabled', true) } //鍒濆鍖栬〃鏍� function set_InitGrid() { + let uneditableColStyle = 'background-color: #eeeeee;' //琛ㄥご columns = [ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' } - , { templet: '#xuhao', field: '搴忓彿', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 } + , { templet: '#xuhao', field: '搴忓彿', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100, style: uneditableColStyle } , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true } , { field: 'HMaterCode', title: '鍣ㄥ叿浠g爜', edit: 'text', event: 'HMaterCode', width: 100 } - , { field: 'HMaterName', title: '鍣ㄥ叿鍚嶇О', edit: 'text', width: 100 } - , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 } + , { field: 'HMaterName', title: '鍣ㄥ叿鍚嶇О', style: uneditableColStyle, width: 100 } + , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', style: uneditableColStyle, width: 100 } , { field: 'HPropertyID', title: 'HPropertyID', edit: 'text', width: 100, hide: true } - , { field: 'HPropertyCode', title: '杈呭姪灞炴�т唬鐮�', edit: 'text', event: 'HPropertyCode', width: 120 } - , { field: 'HPropertyName', title: '杈呭姪灞炴�у悕绉�', edit: 'text', width: 120 } + , { field: 'HPropertyCode', title: '杈呭姪灞炴�т唬鐮�', hide: true, edit: 'text', event: 'HPropertyCode', width: 120 } + , { field: 'HPropertyName', title: '杈呭姪灞炴�у悕绉�', hide: true, edit: 'text', width: 120 } , { field: 'HSecUnitID', title: 'HSecUnitID', edit: 'text', width: 100, hide: true } - , { field: 'HSecUnitCode', title: '杈呭姪璁¢噺鍗曚綅浠g爜', edit: 'text', event: 'HSecUnitCode', width: 120 } - , { field: 'HSecUnitName', title: '杈呭姪璁¢噺鍗曚綅鍚嶇О', edit: 'text', width: 120 } + , { field: 'HSecUnitCode', title: '杈呭姪璁¢噺鍗曚綅浠g爜', hide: true, edit: 'text', event: 'HSecUnitCode', width: 120 } + , { field: 'HSecUnitName', title: '杈呭姪璁¢噺鍗曚綅鍚嶇О', hide: true, edit: 'text', width: 120 } , { field: 'HSecUnitRate', title: '鎹㈢畻鐜�', edit: 'text', width: 100, totalRow: true } , { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true } , { field: 'HUnitCode', title: '璁¢噺鍗曚綅浠g爜', edit: 'text', event: 'HUnitCode', width: 120 } - , { field: 'HUnitName', title: '璁¢噺鍗曚綅鍚嶇О', edit: 'text', width: 120 } - , { field: 'HBatchNo', title: '鎵规', edit: 'text', width: 100 } - , { field: 'HDesignLife', title: '璁捐瀵垮懡', edit: 'text', width: 100 } - , { field: 'HLeaveLife', title: '鍓╀綑瀵垮懡', edit: 'text', width: 100 } + , { field: 'HUnitName', title: '璁¢噺鍗曚綅鍚嶇О', style: uneditableColStyle, width: 120 } + , { field: 'HBatchNo', title: '鎵规', edit: 'text', hide: true, width: 100 } + , { field: 'HDesignLife', title: '璁捐瀵垮懡', edit: 'text', hide: true, width: 100 } + , { field: 'HLeaveLife', title: '鍓╀綑瀵垮懡', edit: 'text', hide: true, width: 100 } , { field: 'HUseLife', title: '浣跨敤瀵垮懡', edit: 'text', width: 100 } , { field: 'HQty', title: '瀹炲彂鏁伴噺', edit: 'text', width: 100, totalRow: true } - , { field: 'HPrice', title: '鍗曚环', edit: 'text', width: 100, totalRow: true } - , { field: 'HMoney', title: '閲戦', edit: 'text', width: 100, totalRow: true } + , { field: 'HPrice', title: '鍗曚环', edit: 'text', width: 100, hide: true, totalRow: true } + , { field: 'HMoney', title: '閲戦', edit: 'text', width: 100, hide: true, totalRow: true } , { field: 'HWHID', title: 'HWHID', edit: 'text', width: 100, hide: true } , { field: 'HWHCode', title: '鍙戣揣浠撳簱浠g爜', edit: 'text', event: 'HWHCode', width: 120 } - , { field: 'HWHName', title: '鍙戣揣浠撳簱鍚嶇О', edit: 'text', width: 120 } + , { field: 'HWHName', title: '鍙戣揣浠撳簱鍚嶇О', style: uneditableColStyle, width: 120 } , { field: 'HSPID', title: 'HSPID', edit: 'text', width: 100, hide: true } , { field: 'HSPCode', title: '浠撲綅浠g爜', edit: 'text', event: 'HSPCode', width: 100 } - , { field: 'HSPName', title: '浠撲綅鍚嶇О', edit: 'text', width: 100 } + , { field: 'HSPName', title: '浠撲綅鍚嶇О', style: uneditableColStyle, width: 100 } , { field: 'HRemark', title: '澶囨敞', edit: 'text', width: 100 } , { field: 'HStockOrgID', title: 'HStockOrgID', width: 100, hide: true } , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } @@ -786,6 +1034,7 @@ //鑾峰彇鏈�澶у崟鎹彿 get_MAXNum(); option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; + clear_BillMakeMsg() table.render(option); } @@ -820,7 +1069,7 @@ //鏌ヨ妫�楠屾柟妗堝崟鏄惁瀛樺湪 $.ajax({ - url: GetWEBURL() + "Sc_MouldScrapOutHouseBill/Sc_MouldScrapOutHouseBillListCheckDetai", + url: GetWEBURL() + "/Sc_MouldScrapOutHouseBill/Sc_MouldScrapOutHouseBillListCheckDetai", type: "GET", data: { "HID": linterid @@ -840,7 +1089,7 @@ , "HWHName": data.浠撳簱鍚嶇О //浠撳簱鍚嶇О , "HKeeperID": data.HKeeperID //鍙戣揣鍛業D , "HKeeperName": data.鍙戣揣鍛樺悕绉� //鍙戣揣鍛樺悕绉� - + , "HBillStatus": data.HBillStatus , "HDeptID": data.HDeptID //閮ㄩ棬ID , "HDeptName": data.閮ㄩ棬鍚嶇О //閮ㄩ棬鍚嶇О , "HSourceBillType": "0" //婧愬崟绫诲瀷 @@ -850,7 +1099,23 @@ , "HSupTypeID": data.寰�鏉ョ被鍨� , "HSupName": data.寰�鏉ュ崟浣� , "HSupID": data.HSupID + , "HMakeDate": isEmpty(data.鍒跺崟鏃ユ湡) === true ? "" : util.toDateString(new Date(data.鍒跺崟鏃ユ湡), "yyyy-MM-dd HH:mm:ss") + , "HMaker": data.鍒跺崟浜� + , "HChecker": data.瀹℃牳浜� + , "HCheckDate": isEmpty(data.瀹℃牳鏃ユ湡) === true ? "" : util.toDateString(new Date(data.瀹℃牳鏃ユ湡), "yyyy-MM-dd HH:mm:ss") + , "HCloseMan": data.鍏抽棴浜� + , "HCloseDate": isEmpty(data.鍏抽棴鏃ユ湡) === true ? "" : util.toDateString(new Date(data.鍏抽棴鏃ユ湡), "yyyy-MM-dd HH:mm:ss") + , "HUpDater": data.淇敼浜� + , "HUpDateDate": isEmpty(data.淇敼鏃ユ湡) === true ? "" : util.toDateString(new Date(data.淇敼鏃ユ湡), "yyyy-MM-dd HH:mm:ss") + , "HDeleteMan": data.浣滃簾浜� + , "HDeleteDate": isEmpty(data.浣滃簾鏃ユ湡) === true ? "" : util.toDateString(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd HH:mm:ss") }); + + if (isEmpty(data.瀹℃牳浜�) === false) { + $("#add-btn").addClass("layui-btn-disabled").attr("disabled", true) + } else { + $("#check-btn").removeClass("layui-btn-disabled").attr("disabled", false) + } } else { layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' }); @@ -879,7 +1144,7 @@ $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D //缂栬緫鍔犺浇鏁版嵁 $.ajax({ - url: GetWEBURL() + 'Sc_MouldScrapOutHouseBill/Sc_MouldScrapOutHouseBillListProjectDetai', + url: GetWEBURL() + '/Sc_MouldScrapOutHouseBill/Sc_MouldScrapOutHouseBillListProjectDetai', type: "GET", data: { "sqlWhere": "and hmainid=" + linterid }, success: function (result) { @@ -947,6 +1212,20 @@ }); } } + + function clear_BillMakeMsg() { + $("#HMakeDate").val('') + $("#HMaker").val(sessionStorage['HMaker']) + $("#HChecker").val('') + $("#HCheckDate").val('') + $("#HCloseMan").val('') + $("#HCloseDate").val('') + $("#HUpDater").val('') + $("#HUpDateDate").val('') + $("#HDeleteMan").val('') + $("#HDeleteDate").val('') + } + //琛ㄦ牸琛屽唴浜嬩欢蹇嵎閿瓫閫� function set_GridCellCheck(obj) { @@ -1336,8 +1615,37 @@ } + + //鑾峰彇缁勭粐 + function Organ() { + //鑾峰彇鐧诲綍椤电粍缁囧垪 + $.ajax({ + type: "get", + async: false, + url: GetWEBURL() + "/Web/GetOrganizations", + success: function (result) { + var Organization = ""; + if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + var data = result.data; + for (var i = 0; i < data.length; i++) { + Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; + } + $("#HOrgID").append(Organization); + $("#HOrgID").val(sessionStorage["OrganizationID"]) + form.render("select"); + } + layer.closeAll("loading"); + } + }) + } + + function init_BillStatus(state) { + $('#HBillStatus').val(state) + } //#endregion }); + + //闈炵┖楠岃瘉 function AllowLoadData(sSubStr) { //闈炵┖楠岃瘉 var Result = true; @@ -1377,10 +1685,11 @@ layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璁¢噺鍗曚綅淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); return Result = false; } - if (sSubStr[i].HDesignLife == "") { - layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璁捐瀵垮懡淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); - return Result = false; - } + // 璁捐瀵垮懡 闈炲繀褰曢」鐩� + // if (sSubStr[i].HDesignLife == "") { + // layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璁捐瀵垮懡淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + // return Result = false; + // } if (sSubStr[i].HQty == "") { layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,瀹炲彂鏁伴噺淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); return Result = false; @@ -1415,6 +1724,13 @@ $("#HKeeperName").val(obj[0].鑱屽憳鍚嶇О); $("#HKeeperID").val(obj[0].HItemID); } + + function GetHSecManagerValue(obj) //杩斿洖楠屾敹鍛� + { + $("#HSecManagerName").val(obj[0].鑱屽憳鍚嶇О); + $("#HSecManagerID").val(obj[0].HItemID); + } + function GetHDeptNameValue(obj) //杩斿洖閮ㄩ棬 { @@ -1461,4 +1777,5 @@ } </script> </body> + </html> \ No newline at end of file diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBillList.html" index 5d7beab..df3e1ec 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldScrapOutBillList.html" @@ -1,5 +1,6 @@ 锘�<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> + <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>鍣ㄥ叿澶勭悊鍑哄簱鍗曞垪琛�</title> @@ -25,6 +26,7 @@ } </style> </head> + <body> <div class="layui-fluid"> <div class="layui-col-md12"> @@ -36,6 +38,14 @@ <div class="layui-colla-title layui-inline"> <div class="layui-inline"> <span>鏇村</span> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">鏃ユ湡闂撮殧</label> + <div class="layui-input-block"> + <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" + lay-filter="HInitTimeCycle" style="width:190px;"> + </select> </div> </div> <div class="layui-inline"> @@ -53,23 +63,21 @@ <div class="layui-inline"> <label class="layui-form-label">鍗曟嵁鍙�</label> <div class="layui-input-block"> - <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo"> - </div> - </div> - <div class="layui-inline"> - <label class="layui-form-label">缁勭粐鍚嶇О</label> - <div class="layui-input-block"> - <input type="text" class="layui-input ForFilteringSchemes" name="HStockOrgName" id="HStockOrgName" style="width:190px;"> + <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" + id="HBillNo"> </div> </div> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> + <button class="layui-btn layuiadmin-btn-order" 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">閲嶇疆</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" + lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button> <!--鏄剧ず褰撳墠杩囨护鏂规--> <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 style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" + id="HFilterScheme_Now"></div> </div> <div class="layui-colla-content"> <div class="layui-inline"> @@ -78,52 +86,72 @@ </div> </div> <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">缁勭粐</label> + <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> + <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" + class="ForFilteringSchemes"> + <!--鍔ㄦ�佹覆鏌撶粍缁�--> + </select> + </div> + </div> + <div class="layui-inline"> <label class="layui-form-label">閮ㄩ棬淇℃伅</label> <div class="layui-input-block"> - <input type="text" class="layui-input ForFilteringSchemes" name="HDept" id="HDept" style="width:190px;"> + <input type="text" class="layui-input ForFilteringSchemes" name="HDept" + id="HDept" style="width:190px;"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">鐗╂枡浠g爜</label> <div class="layui-input-block"> - <input type="text" class="layui-input ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber" style="width:190px;"> + <input type="text" class="layui-input ForFilteringSchemes" + name="HMaterNumber" id="HMaterNumber" style="width:190px;"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">鍣ㄥ叿浠g爜</label> <div class="layui-input-block"> - <input type="text" class="layui-input ForFilteringSchemes" name="HModelNumber" id="HModelNumber" style="width:190px;"> + <input type="text" class="layui-input ForFilteringSchemes" + name="HModelNumber" id="HModelNumber" style="width:190px;"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">浠撳簱</label> <div class="layui-input-block"> - <input type="text" class="layui-input ForFilteringSchemes" name="HWhName" id="HWhName" style="width:190px;"> + <input type="text" class="layui-input ForFilteringSchemes" name="HWhName" + id="HWhName" style="width:190px;"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">寰�鏉ュ崟浣�</label> <div class="layui-input-block"> - <input type="text" class="layui-input ForFilteringSchemes" name="HSupName" id="HSupName" style="width:190px;"> + <input type="text" class="layui-input ForFilteringSchemes" name="HSupName" + id="HSupName" style="width:190px;"> </div> </div> <div class="layui-row" style="margin-top:5px"> <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;" class="ForFilteringSchemes"> + <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;" class="ForFilteringSchemes"> + <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> <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> <option value="7">鍖呭惈</option> <option value="8">宸﹀寘鍚�</option> <option value="9">鍙冲寘鍚�</option> @@ -131,26 +159,33 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input ForFilteringSchemes" 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:5px"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;" class="ForFilteringSchemes"> + <select name="ColName1" id="ColName1" lay-filter="ColName1" + style="width:190px;" class="ForFilteringSchemes"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" style="width:190px;" class="ForFilteringSchemes"> + <select name="Comparator1" id="Comparator1" lay-filter="Comparator1" + style="width:190px;" class="ForFilteringSchemes"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> <option value="7">鍖呭惈</option> <option value="8">宸﹀寘鍚�</option> <option value="9">鍙冲寘鍚�</option> @@ -158,26 +193,33 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1"> + <input type="text" class="layui-input ForFilteringSchemes" value="" + name="ColContent1" id="ColContent1"> </div> </div> <div class="layui-row" style="margin-top:5px"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;" class="ForFilteringSchemes"> + <select name="ColName2" id="ColName2" lay-filter="ColName2" + style="width:190px;" class="ForFilteringSchemes"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" style="width:190px;" class="ForFilteringSchemes"> + <select name="Comparator2" id="Comparator2" lay-filter="Comparator2" + style="width:190px;" class="ForFilteringSchemes"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> <option value="7">鍖呭惈</option> <option value="8">宸﹀寘鍚�</option> <option value="9">鍙冲寘鍚�</option> @@ -185,7 +227,8 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2"> + <input type="text" class="layui-input ForFilteringSchemes" value="" + name="ColContent2" id="ColContent2"> </div> </div> </div> @@ -197,11 +240,13 @@ <div class="layui-btn-container" id="toolbarDemo_ButtonSet"> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Copy" id="btn-Copy"><i class="layui-icon layui-icon-transfer"></i>澶嶅埗</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view" id="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit" id="btn-audit"><i class="layui-icon layui-icon-repeat"></i>瀹℃牳</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit" id="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>鍙嶅鏍�</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-Export" id="btn-Export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close" id="Close"><i class="layui-icon layui-icon-radio"></i>鍏抽棴</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeClose" id="DeClose"><i class="layui-icon layui-icon-radio"></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> @@ -228,7 +273,7 @@ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ index: 'lib/index', //涓诲叆鍙fā鍧� - }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () { + }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate', 'soulTable'], function () { //#region 鍏叡鍙橀噺 var $ = layui.$ @@ -248,6 +293,7 @@ var HModName = "Sc_MouldScrapOutBillList"; var HBillType = "3832"; var set_HideButton_ID = "toolbarDemo_ButtonSet";//闇�瑕佽缃殑鎸夐挳鐨勭埗绾ц妭鐐圭殑id + var titleData = ['sorderid'] // 杩囨护鐨勫垪鍚� //#region 銆愯繃婊ゆ柟妗堛�� @@ -287,7 +333,7 @@ table.on('toolbar(mainTable)', function (obj) { var checkStatus = table.checkStatus(obj.config.id); switch (obj.event) { - + //鏂板 case 'btn-Add': set_AddNew(); break; @@ -306,8 +352,14 @@ //鍙嶅鏍� case 'btn-Faudit': get_FAudit(); break; + //澶嶅埗 + case 'btn-Copy': set_CopyBill(); + break; //鍒犻櫎 case 'btn-Delete': set_DeleteBill(); + break; + //瀵煎嚭 + case 'btn-Export': get_Export(); break; //鍏抽棴鎸夐挳 锛�0:鍏抽棴銆�1:鍙嶅叧闂級 case 'btn-Close': @@ -340,6 +392,14 @@ }; }); + // 鑷畾涔変簨浠� + table.on('tool(mainTable)', function (obj) { + let data = obj.data + switch (obj.event) { + case "onHBillNumberClickHandler": onHBillNumberClickHandler(data); break; + } + }) + //#region 鎺掑簭鍚庨�夋嫨 table.on('sort(mainTable)', function (obj) { //娉細sort 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��" table.reload('mainTable', { @@ -364,6 +424,7 @@ //閲嶇疆鎸夐挳 form.on('submit(btnReSearch)', function (data) { + var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); $("#HBillNo").val(""); @@ -398,10 +459,22 @@ // 鍒濆鍖栫晫闈� function set_ClearBill() { - $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); - $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); + //鍒濆鍖栫粍缁� + Organ(); //鍒濆鍖栬〃鏍� set_InitGrid(); + //鍒濆鍖栨棩鏈熼棿闅斻�佸紑濮嬫棩鏈熴�佺粨鏉熸棩鏈� + setSelect_HInitTimeCycle(); + var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; + if (HInitTimeCycle != -1) { + $('#HBeginDate').prop('disabled', true); + $('#HEndDate').prop('disabled', true); + } else { + $('#HBeginDate').prop('disabled', false); + $('#HEndDate').prop('disabled', false); + } + $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); + $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); //鏌ヨ get_FastQuery(); //鍒濆鍖栭〉澶у皬 @@ -464,9 +537,9 @@ , { field: '杈呭姪璁¢噺鍗曚綅鍚嶇О', title: '杈呭姪璁¢噺鍗曚綅鍚嶇О', width: 200, sort: true } , { field: '鎹㈢畻鐜�', title: '鎹㈢畻鐜�', width: 200, sort: true } , { field: '鎵规', title: '鎵规', width: 200, sort: true } - , { field: '瀹炲彂鏁伴噺', title: '瀹炲彂鏁伴噺', width: 200, sort: true, totalRow: true} + , { field: '瀹炲彂鏁伴噺', title: '瀹炲彂鏁伴噺', width: 200, sort: true, totalRow: true } , { field: '鍗曚环', title: '鍗曚环', width: 200, sort: true, totalRow: true } - , { field: '閲戦', title: '閲戦', width: 200, sort: true, totalRow: true} + , { field: '閲戦', title: '閲戦', width: 200, sort: true, totalRow: true } , { field: '璁捐瀵垮懡', title: '璁捐瀵垮懡', width: 200, sort: true } , { field: '浣跨敤瀵垮懡', title: '浣跨敤瀵垮懡', width: 200, sort: true } , { field: '鍓╀綑瀵垮懡', title: '鍓╀綑瀵垮懡', width: 200, sort: true } @@ -548,12 +621,63 @@ $.ajax({ url: GetWEBURL() + '/Sc_MouldScrapOutHouseBill/page', type: "GET", - data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": optionPage.curr, "size": optionPage.limit }, + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": optionPage.curr, "size": optionPage.limit }, success: function (data1) { option.limit = optionPage.limit;//鏀瑰彉琛ㄦ牸椤靛ぇ灏� if (data1.code == 1) { optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟 option.data = data1.data; + + optionPage.count = data1.count;//鏀瑰彉鍒楄〃鏁版嵁鎬绘暟 + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚� + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛� + var patrn = new RegExp(/^h/i); + if (patrn.test(data1.list[key].ColmCols)) { + titleData[key] = data1.list[key].ColmCols; + } + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }); + for (var i = 0; i < data.length; i++) { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 160 }); + break; + case 'Decimal': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + case 'Int32': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); + break; + default: + if (data[i].name === '鍗曟嵁鍙�') { + col.push({ + field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, + templet: function (d) { + return '<span style="color: blue;" lay-unrow >' + d.鍗曟嵁鍙� + '</span>' + }, style: 'cursor: pointer;', event: 'onHBillNumberClickHandler' + }); + } else { + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } + } + } + } + + columns = col; + option.cols = [col]; + option.data = data1.data; + option.totalRow = true; laypage.render(optionPage); //鍒楄缃� DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option); @@ -562,6 +686,12 @@ //鍒锋柊鎸夐挳鏄剧ず Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); layer.close(ajaxLoad); + + layer.close(ajaxLoad); + if ($("#ColName option").length < 1) { + ColFilter(); + get_DefaultModule() + } } else { layer.close(ajaxLoad); layer.alert(data1.code + data1.Message, { icon: 5 }); @@ -733,11 +863,6 @@ , data = checkStatus.data; if (checkStatus.data.length === 1) { var linterid = data[0].hmainid.toString(); - var HBillStatus = data[0].HBillStatus.toString(); - if (HBillStatus >1) { - layer.msg('鍗曟嵁鐘舵�佷笉涓烘湭瀹℃牳鐘舵��,涓嶅厑璁哥紪杈戯紒'); - return false; - } //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉 layer.open({ type: 2 @@ -783,6 +908,25 @@ } } + //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉 + form.on('select(HInitTimeCycle)', function (data) { + var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; + //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨 + if (HInitTimeCycle != -1) { + $('#HBeginDate').prop('disabled', true); + $('#HEndDate').prop('disabled', true); + + $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); + $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); + + //鎵ц鏌ヨ鏂规硶 + get_FastQuery(); + } else { + $('#HBeginDate').prop('disabled', false); + $('#HEndDate').prop('disabled', false); + } + }); + //#region 鐐瑰嚮琛岄�変腑楂樹寒 table.on('row(mainTable)', function (obj) { //閫変腑琛屾敼鍙橀鑹� @@ -824,6 +968,48 @@ layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒'); } } + + //#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃 + function setSelect_HInitTimeCycle() { + var valueList = [0, 1, 2, 3, 4, 5, 6, 29]; + var titleList = ["浠婂ぉ", "杩戜袱澶�", "杩戜笁澶�", "杩戝洓澶�", "杩戜簲澶�", "杩戝叚澶�", "杩戜竷澶�", "杩�30澶�"]; + + var HInitTimeCycle_ArrayList = '<option value="-1" selected="selected" >浠绘剰闂撮殧</option>'; + for (var i = 0; i < valueList.length; i++) { + HInitTimeCycle_ArrayList += '<option style="color:blue;" value="' + valueList[i] + '">' + titleList[i] + '</option>'; + } + + $("#HInitTimeCycle").empty(); + $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList); + form.render('select'); + + $("#HInitTimeCycle").val("29"); + } + //#endregion + + //鑾峰彇缁勭粐 + function Organ() { + //鑾峰彇鐧诲綍椤电粍缁囧垪 + $.ajax({ + type: "get", + async: false, + url: GetWEBURL() + "/Web/GetOrganizations", + success: function (result) { + var Organization = ""; + if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + var data = result.data; + for (var i = 0; i < data.length; i++) { + Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; + } + $("#HOrgID").append(Organization); + $("#HOrgID").val(sessionStorage["OrganizationID"]) + form.render('select'); + } + layer.closeAll("loading"); + } + }) + } + //瀹℃牳 function get_Audit() { var checkStatus = table.checkStatus('mainTable') @@ -832,7 +1018,7 @@ var InterID = data[0].hmainid.toString(); $.ajax({ type: "GET", - url: GetWEBURL() + "Sc_MouldScrapOutHouseBill/AuditMouldScrapOutHouseBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + url: GetWEBURL() + "/Sc_MouldScrapOutHouseBill/AuditMouldScrapOutHouseBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� data: { "HInterID": InterID, "user": sessionStorage["HUserName"], "flag": 1 }, success: function (result) { if (result.count == 1) { @@ -864,7 +1050,7 @@ var InterID = data[0].hmainid.toString(); $.ajax({ type: "GET", - url: GetWEBURL() + "Sc_MouldScrapOutHouseBill/AuditMouldScrapOutHouseBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + url: GetWEBURL() + "/Sc_MouldScrapOutHouseBill/AuditMouldScrapOutHouseBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� data: { "HInterID": InterID, "user": sessionStorage["HUserName"], "flag": 2 }, success: function (result) { if (result.count == 1) { @@ -1073,20 +1259,20 @@ } } - //var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; + var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨 - //if (HInitTimeCycle != -1) { - // $('#HBeginDate').prop('disabled', true); - // $('#HEndDate').prop('disabled', true); + if (HInitTimeCycle != -1) { + $('#HBeginDate').prop('disabled', true); + $('#HEndDate').prop('disabled', true); - // $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); - // $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); - // ////鎵ц鏌ヨ鏂规硶 - // //get_FastQuery(); - //} else { - // $('#HBeginDate').prop('disabled', false); - // $('#HEndDate').prop('disabled', false); - //} + $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); + $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); + ////鎵ц鏌ヨ鏂规硶 + //get_FastQuery(); + } else { + $('#HBeginDate').prop('disabled', false); + $('#HEndDate').prop('disabled', false); + } //鎵ц鏌ヨ鏂规硶 get_FastQuery() @@ -1251,6 +1437,54 @@ , title: '杩囨护鏂规鍒楄〃' , shift: 0//寮瑰嚭鍔ㄧ敾 , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName + , btn: ['纭', '鍙栨秷'], + btn1: function (index, laero) { + //鎸夐挳涓� 鐨勫洖璋� + var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹� + + if (checkStatus.data.length !== 1) { + return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + let hmainid = checkStatus.data[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].HInterID + //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢 + 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); + } + } + + layer.close(index);//鍏抽棴寮圭獥 + + } else { + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + + }, + btn2: function () { + HIsClose_Manual = true; + } , cancel: function () { // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫 HIsClose_Manual = true; @@ -1264,6 +1498,82 @@ }) } + //#endregion + + //#region 鑷畾涔変簨浠舵崟鑾� + function onHBillNumberClickHandler(data) { + var linterid = data.hmainid; + //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉 + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '缂栬緫' + HPageTitle + , closeBtn: 1 + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: '../妯℃不鍏蜂粨搴撶鐞�/Sc_MouldScrapOutBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=&closeType=1' + , resize: false, + end: function () { + //鍒锋柊椤甸潰, + location.reload(); + } + , cancel: function () { + //$(".layui-btn").removeClass("layui-btn-disabled"); + } + }) + } + //#endregion + + // 澶嶅埗 + function set_CopyBill() { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var linterid = data[0].hmainid; + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '澶嶅埗' + HPageTitle + , closeBtn: 1 + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: '../妯℃不鍏蜂粨搴撶鐞�/Sc_MouldScrapOutBill.html?OperationType=2&linterid=' + linterid + '&HSouceBillType=&closeType=1' + , resize: false, + end: function () { + //鍒锋柊椤甸潰, + location.reload(); + } + , cancel: function () { + //$(".layui-btn").removeClass("layui-btn-disabled"); + } + }) + } else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹鍒讹紒'); + } + } + + //#region 瀵煎嚭Execel + function get_Export() { + var ModRightNameCheck = HModName + "_ExportExcel"; + + //閫昏緫瀹℃牳鏂规硶 + $.ajax({ + type: "GET", + url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� + data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.count == 1) { + table.exportFile(ins.config.id, option.data, "xls"); + } else { + layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 }); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } //#endregion //#endregion @@ -1314,4 +1624,5 @@ </script> </body> -</html> + +</html> \ No newline at end of file diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sb_Add_MouldRepairWorkBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sb_Add_MouldRepairWorkBillList.html" index df9544d..50f837f 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sb_Add_MouldRepairWorkBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sb_Add_MouldRepairWorkBillList.html" @@ -292,6 +292,16 @@ dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> </div> </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">缁勭粐</label> + <div class="layui-input-block" + style="margin-left: 120px; width: 185px;"> + <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" + class="ForFilteringSchemes" disabled> + <!--鍔ㄦ�佹覆鏌撶粍缁�--> + </select> + </div> + </div> </div> <div class="layui-form-item"> <div class="layui-inline"> @@ -420,6 +430,7 @@ <div class="layui-btn-container"> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></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> </div> </script> <script type="text/html" id="toolbarDemo1"> @@ -454,9 +465,12 @@ <script src="../../../layuiadmin/PubCustom.js"></script> <script src="../../../layuiadmin/PageTitle.js"></script> <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> + <script src="../../../layuiadmin/common.js"></script> + <script src="../../../layuiadmin/SetColumn.js"></script> <script> //鑾峰彇鍙傛暟 var params = get_UrlVars(); + var optionData = [] if (typeof (params[params[0]]) == "undefined") { var OperationType = 1;//鎿嶄綔绫诲瀷 } else { @@ -482,6 +496,7 @@ var option = [];//淇濆吇 var option1 = [];//閰嶄欢 var sBillType = "3807"; + var HModName = "Sb_Add_MouldRepairWorkBillList" //var TabRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " " }; //#endregion @@ -549,6 +564,8 @@ break; //澶嶅埗涓�琛� case 'btn-CopyLine': set_CopyLine(data); + break; + case 'set_HideColumn': get_HideColumnEdit(HModName, sessionStorage["HUserName"], option, table); break; } }); @@ -886,6 +903,12 @@ $("#HMainSourceBillNo").val(checkStatus.data[0].鍗曟嵁鍙�); $("#HMainSourceInterID").val(checkStatus.data[0].hmainid); $("#HMainSourceEntryID").val(checkStatus.data[0].hsubid); + + // 甯﹀嚭 鍣ㄥ叿淇℃伅 + $("#HMouldCode").val(checkStatus.data[0].浜у搧妯″叿浠g爜); + $("#HName").val(checkStatus.data[0].浜у搧妯″叿); + $("#HModel").val(checkStatus.data[0].妯″叿鍨嬪彿); + $("#HMouldID").val(checkStatus.data[0].HMouldID); layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� //var list = []; //for (var i = 0; i < checkStatus.data.length; i++) { @@ -983,6 +1006,12 @@ $("#HMainSourceBillNo").val(checkStatus.data[0].鍗曟嵁鍙�); $("#HMainSourceInterID").val(checkStatus.data[0].hmainid); $("#HMainSourceEntryID").val(checkStatus.data[0].hsubid); + + // 甯﹀嚭 鍣ㄥ叿淇℃伅 + $("#HMouldCode").val(checkStatus.data[0].浜у搧妯″叿浠g爜); + $("#HName").val(checkStatus.data[0].浜у搧妯″叿); + $("#HModel").val(checkStatus.data[0].妯″叿鍨嬪彿); + $("#HMouldID").val(checkStatus.data[0].HMouldID); layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� } }); @@ -1051,7 +1080,9 @@ //#region 褰撳墠椤甸潰鎵�鏈夋柟娉� //鍒濆鍖栬〃鍗曟彃浠� function set_InitFrom() { - $("#check-btn").addClass('layui-btn-disabled').attr('disabled', true) + $("#check-btn").addClass('layui-btn-disabled').attr('disabled', true); + // 鍒濆鍖栫粍缁� + Organ(); //甯歌鐢ㄦ硶 laydate.render({ elem: '#HDate' @@ -1068,17 +1099,18 @@ } //鍒濆鍖栬〃鏍� function set_InitGrid() { + let unEditableColStyle = 'background-color: #eeeeee;' //琛ㄥご columns = [ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' } - , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" } + , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", style: unEditableColStyle } , { field: 'HRepairID', title: '缁翠慨椤圭洰ID', edit: 'text', hide: true } , { field: 'HRepairCode', title: '缁翠慨椤圭洰浠g爜', edit: 'text', event: "HRepairCode" } - , { field: 'HRepairName', title: '缁翠慨椤圭洰' } + , { field: 'HRepairName', title: '缁翠慨椤圭洰', style: unEditableColStyle } , { field: 'HRepairExplanation', title: '缁翠慨瑕佹眰', edit: 'text' } , { field: 'HManagerID', title: 'HManagerID', edit: 'text', hide: true } , { field: 'HManagerCode', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: "HManagerCode" } - , { field: 'HManagerName', title: '璐熻矗浜�' } + , { field: 'HManagerName', title: '璐熻矗浜�', style: unEditableColStyle } , { field: 'HMoney', title: '缁翠慨璐圭敤', event: "", edit: 'text' } , { field: 'HRemark', title: '澶囨敞', event: "", edit: 'text' } //, { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�' } @@ -1104,14 +1136,18 @@ //鍒濆鍖栬〃鏍� function set_InitGrid1() { + let unEditableColStyle = 'background-color: #eeeeee;' //琛ㄥご columns = [ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' } - , { templet: '#xuhao1', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" } + , { templet: '#xuhao1', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", style: unEditableColStyle } , { field: 'HMaterID', title: '閰嶄欢ID', edit: 'text', hide: true } , { field: 'HMaterNumber', title: '閰嶄欢浠g爜', edit: 'text', event: "HMaterNumber", } - , { field: 'HUnitID', title: '鍗曚綅ID', edit: 'text', event: "", hide: true } + , { field: 'HMaterName', title: '閰嶄欢鍚嶇О', style: unEditableColStyle } + , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', style: unEditableColStyle } + , { field: 'HUnitID', title: '鍗曚綅ID', event: "", hide: true } , { field: 'HUnitNumber', title: '鍗曚綅浠g爜', edit: 'text', event: "HUnitNumber" } + , { field: 'HUnitName', title: '璁¢噺鍗曚綅', style: unEditableColStyle } , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', edit: 'text', totalRow: true } , { field: 'HQtyMust', title: '鍗曚綅鐢ㄩ噺', edit: 'text', totalRow: true } , { field: 'HRemark', title: '澶囨敞', edit: 'text' } @@ -1231,7 +1267,7 @@ , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd") }); if (isEmpty(data.瀹℃牳浜�) == false) { - $("#save-btn").addClass('layui-btn-disabled').attr('disabled', true) + $("#Saver").addClass('layui-btn-disabled').attr('disabled', true) } else { $("#check-btn").removeClass('layui-btn-disabled').attr('disabled', false) } @@ -1344,12 +1380,36 @@ if (checkStatus.data.length === 0) { return layer.msg('璇烽�夋嫨鏁版嵁'); } - //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊� - obj.update({ - HRepairID: checkStatus.data[0].hitemid, - HRepairCode: checkStatus.data[0].缁翠慨椤圭洰浠g爜, - HRepairName: checkStatus.data[0].缁翠慨椤圭洰, - }); + else if (checkStatus.data.length === 1) { + //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊� + obj.update({ + HRepairID: checkStatus.data[0].hitemid, + HRepairCode: checkStatus.data[0].缁翠慨椤圭洰浠g爜, + HRepairName: checkStatus.data[0].缁翠慨椤圭洰, + }); + } else { + let tempArr = [] + let currTable = table.cache['mainTable'] + for (let curr of currTable) { + debugger + if (isEmpty(curr.HRepairID, true, true) === false) { + tempArr.push(curr) + } + } + + for (let checkOne of checkStatus.data) { + tempArr.push({ + HRepairID: checkOne.hitemid, + HRepairCode: checkOne.缁翠慨椤圭洰浠g爜, + HRepairName: checkOne.缁翠慨椤圭洰, + }) + } + + table.reload('mainTable', { + data: tempArr + }) + + } layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� } @@ -1358,7 +1418,14 @@ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 }, end: function () { - + if (isEmpty(optionData) === false) { + obj.update({ + HRepairID: optionData[0].hitemid, + HRepairCode: optionData[0].缁翠慨椤圭洰浠g爜, + HRepairName: optionData[0].缁翠慨椤圭洰, + }) + optionData = [] + } } }); } @@ -1399,7 +1466,14 @@ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 }, end: function () { - + if (isEmpty(optionData) === false) { + obj.update({ + HManagerID: optionData[0].HItemID, + HManagerCode: optionData[0].鑱屽憳浠g爜, + HManagerName: optionData[0].鑱屽憳鍚嶇О + }) + optionData = [] + } } }); } @@ -1436,13 +1510,38 @@ if (checkStatus.data.length === 0) { return layer.msg('璇烽�夋嫨鏁版嵁'); } - //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊� - obj.update({ - HMaterID: checkStatus.data[0].HItemID, - HMaterNumber: checkStatus.data[0].鐗╂枡浠g爜, - HMaterName: checkStatus.data[0].鐗╂枡鍚嶇О + else if (checkStatus.data.length === 1) { + //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊� + obj.update({ + HMaterID: checkStatus.data[0].HItemID, + HMaterNumber: checkStatus.data[0].鐗╂枡浠g爜, + HMaterName: checkStatus.data[0].鐗╂枡鍚嶇О, + HMaterModel: checkStatus.data[0].瑙勬牸鍨嬪彿 - }); + }); + } else { + let tempArr = [] + let tableBak = table.cache['mainTable1'] + for (let tableOne of tableBak) { + if (isEmpty(tableOne.HMaterID, true, true) === false) { + tempArr.push(tableOne) + } + } + + for (let checkOne of checkStatus.data) { + tempArr.push({ + HMaterID: checkOne.HItemID, + HMaterNumber: checkOne.鐗╂枡浠g爜, + HMaterName: checkOne.鐗╂枡鍚嶇О, + HMaterModel: checkOne.瑙勬牸鍨嬪彿 + }) + } + + table.reload('mainTable1', { + data: tempArr + }) + } + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� } , btn2: function (index, layero) { @@ -1450,6 +1549,16 @@ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 }, end: function () { + if (isEmpty(optionData) === false) { + obj.update({ + HMaterID: optionData[0].HItemID, + HMaterNumber: optionData[0].鐗╂枡浠g爜, + HMaterName: optionData[0].鐗╂枡鍚嶇О, + HMaterModel: optionData[0].瑙勬牸鍨嬪彿 + + }) + optionData = [] + } } }); } @@ -1486,6 +1595,7 @@ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 }, end: function () { + } }); } @@ -1551,6 +1661,29 @@ } }) }) + + //鑾峰彇缁勭粐 + function Organ() { + //鑾峰彇鐧诲綍椤电粍缁囧垪 + $.ajax({ + type: "get", + async: false, + url: GetWEBURL() + "/Web/GetOrganizations", + success: function (result) { + var Organization = ""; + if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + var data = result.data; + for (var i = 0; i < data.length; i++) { + Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; + } + $("#HOrgID").append(Organization); + $("#HOrgID").val(sessionStorage["OrganizationID"]) + form.render('select'); + } + layer.closeAll("loading"); + } + }) + } //澶嶅埗涓�琛� function set_CopyLine(data) { @@ -1818,6 +1951,11 @@ $("#HMainSourceBillNo").val(obj[0].鍗曟嵁鍙�); $("#HMainSourceInterID").val(obj[0].hmainid); $("#HMainSourceEntryID").val(obj[0].hsubid); + // 甯﹀嚭鍣ㄥ叿淇℃伅 + $("#HMouldCode").val(obj[0].浜у搧妯″叿浠g爜); + $("#HName").val(obj[0].浜у搧妯″叿); + $("#HModel").val(obj[0].妯″叿鍨嬪彿); + $("#HMouldID").val(obj[0].HMouldID); } function GetMouldRepairSendWorkValue(obj) { //鍣ㄥ叿缁翠慨娲惧伐鍗� @@ -1826,6 +1964,18 @@ $("#HMainSourceEntryID").val(obj[0].hsubid); } + function GetRepairValue(data) { // 缁翠慨椤圭洰鍒楄〃 + optionData = data + } + + function GetHManagerValue(data) { // 璐熻矗浜哄垪琛� + optionData = data + } + + function GetGyMaterial(data) { + optionData[0] = data + } + </script> </body> diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html" index 3c6611b..8772228 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldConkBookBillList.html" @@ -387,7 +387,7 @@ case 'btn-CopyLine': set_CopyLine(data); break; //鍒楄缃� - case 'set_HideColumn': get_HideColumnNoPage(HModName, sessionStorage["HUserName"], option, set_EditFromGrid); + case 'set_HideColumn': get_HideColumnEdit(HModName, sessionStorage["HUserName"], option, table); break; } }); diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldMaintainBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldMaintainBillList.html" index ce4345c..b3d961c 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldMaintainBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldMaintainBillList.html" @@ -497,7 +497,7 @@ //澶嶅埗涓�琛� case 'btn-CopyLine': btnCopyLine(data); break; - case 'set_HideColumn': get_HideColumnNoPage(HModName, sessionStorage["HUserName"], option, get_FastQuery); + case 'set_HideColumn': get_HideColumnEdit(HModName, sessionStorage["HUserName"], option, table); break; } }); diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldRepairCheckBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldRepairCheckBillList.html" index 374f5ae..a781065 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldRepairCheckBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldRepairCheckBillList.html" @@ -28,6 +28,8 @@ <div class="layui-btn-group"> <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button> + <button type="button" id="check-btn" class="layui-btn layui-btn-normal layui-btn-radius" + lay-submit="" lay-filter="Checker">瀹℃牳</button> <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button> </div> @@ -80,6 +82,20 @@ </button> </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" + lay-verify="HMainSourceBillType" name="HMainSourceBillType" + id="HMainSourceBillType"> + <input type="hidden" class="layui-input" + lay-verify="HMainSourceInterID" name="HMainSourceInterID" + id="HMainSourceInterID"> + <input type="hidden" class="layui-input" + lay-verify="HMainSourceEntryID" name="HMainSourceEntryID" + id="HMainSourceEntryID"> + </div> + </div> </div> <div class="layui-form-item"> @@ -126,6 +142,23 @@ lay-filter="Department" style="width:40px;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> + </button> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">婧愬崟鍙�</label> + <div class="layui-input-block" style="margin-left: 73px;"> + <input type="text" class="layui-input" + lay-verify="HMainSourceInterID" name="HMainSourceBillNo" + id="HMainSourceBillNo" value="" + style="background-color:#efefef4d;width: 60%;display: inline-block;" + readonly> + <button class="layui-btn layuiadmin-btn-order" type="button" + lay-submit="" lay-filter="BtnHMainSourceBillNo" + id="BtnHMainSourceBillNo" + style="padding: 0 10px;float: right;margin-right: 3px;"> + <i + class="layui-icon layui-icon-search layuiadmin-button-btn"></i> </button> </div> </div> @@ -183,6 +216,16 @@ <div class="layui-input-inline"> <textarea placeholder="璇疯緭鍏ュ娉�" class="layui-textarea" name="HRemark" id="HRemark"></textarea> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 65px;">缁勭粐</label> + <div class="layui-input-block" + style="margin-left: 100px; width: 185px;"> + <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" + class="ForFilteringSchemes" disabled> + <!--鍔ㄦ�佹覆鏌撶粍缁�--> + </select> </div> </div> </div> @@ -274,10 +317,9 @@ <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <script type="text/html" id="toolbarDemo"> <div class="layui-btn-container"> - <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></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> </div> </script> <script type="text/html" id="xuhao"> @@ -299,9 +341,12 @@ <script src="../../../layuiadmin/PubCustom.js"></script> <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> <script src="../../../layuiadmin/PageTitle.js"></script> + <script src="../../../layuiadmin/SetColumn.js"></script> + <script src="../../../layuiadmin/common.js"></script> <script> //鑾峰彇鍙傛暟 var params = get_UrlVars(); + var optionData = [] if (typeof (params[params[0]]) == "undefined") { var OperationType = 1;//鎿嶄綔绫诲瀷 } else { @@ -328,6 +373,7 @@ //鏌ヨ鏉′欢 var option = []; var sBillType = "3817"; + var HModName = 'Sc_Add_MouldRepairCheckBillList' //var TabRow = { "HRepairCheckID": 0, "HRepairCheckCode": "", "HRepairCheckName": " ", "HRepairCheckContent": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HRemark": " " } //#endregion @@ -372,6 +418,9 @@ break; //澶嶅埗涓�琛� case 'btn-CopyLine': btnCopyLine(data); + break; + //鍒楄缃� + case 'set_HideColumn': get_HideColumnNoPage(HModName, sessionStorage["HUserName"], option, set_InitGrid); break; } }); @@ -419,6 +468,11 @@ } }); }); + + // 婧愬崟鍙� 鎸夐挳 + form.on("submit(BtnHMainSourceBillNo)", function () { + get_HSourceBillName(); + }) //琛ㄥご淇℃伅楠屾敹浜哄脊绐� form.on('submit(HEmpList)', function () { @@ -617,13 +671,41 @@ } }); + //瀹℃牳 + form.on('submit(Checker)', function () { + layer.confirm("纭瑕佸鏍稿悧?", function (index) { + var wait = layer.load(); + var HInterID = linterid; + $.ajax({ + url: GetWEBURL() + '/Sc_MouldRepairCheckBill/CheckSc_MouldRepairCheckBill', + type: "GET", + data: { "HInterID": HInterID, "Type": 1, "user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.count == 1) { + set_InitGrid() + layer.msg(result.Message, { icon: 1 }); + $("#add-btn").addClass('layui-btn-disabled').attr('disabled', true) + $("#check-btn").addClass('layui-btn-disabled').attr('disabled', true) + layer.close(wait); + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + layer.close(wait); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + layer.close(wait); + } + }); + }) + }) //#endregion //#region 姝ら〉闈㈡墍鏈夋柟娉� //鍒濆鍖栬〃鍗� function set_InitFrom() { - - + $('#check-btn').addClass('layui-btn-disabled').attr('disabled', true); + //鍒濆鍖栫粍缁� + Organ(); laydate.render({ elem: '#HDate' @@ -638,17 +720,18 @@ } //鍒濆鍖栦繚鍏婚」鍒楄〃 function Table() { + let unEditableColStyle = 'background-color: #eeeeee;' //琛ㄥご columns = [ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' } - , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" } + , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", style: unEditableColStyle } , { field: 'HRepairCheckID', title: 'HRepairCheckID', edit: 'text', hide: true } , { field: 'HRepairCheckCode', title: '楠屾敹椤圭洰浠g爜', edit: 'text', event: "HRepairCheckCode" } - , { field: 'HRepairCheckName', title: '楠屾敹椤圭洰', edit: 'text' } + , { field: 'HRepairCheckName', title: '楠屾敹椤圭洰', style: unEditableColStyle } , { field: 'HRepairCheckContent', title: '楠屾敹鍐呭', edit: 'text' } , { field: 'HManagerID', title: 'HManagerID', edit: 'text', hide: true } , { field: 'HManagerCode', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: "HManagerCode" } - , { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' } + , { field: 'HManagerName', title: '璐熻矗浜�', style: unEditableColStyle } , { field: 'HRemark', title: '澶囨敞', event: "", edit: 'text' } , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 150 } ]; @@ -664,6 +747,35 @@ , done: function (res, curr, count) { } }; + } + + function get_HSourceBillName() { + // 閫夋嫨婧愬崟 + layer.open({ + type: 2 //寮圭獥绫诲瀷 + , skin: 'layui-layer-rim' //鍔犱笂杈规 + , area: ['90%', '90%'] //澶у皬 + , title: '鏁呴殰鐧昏鍗�' //鏍囬 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , content: ['../../妯℃不鍏风鐞�/妯℃不鍏风鐞�/Sb_MouldRepairWorkBillList.html?openType=2', 'yes'] + , btn: ['纭畾', '鍙栨秷'] + , btn1: function (index, layero) {//鎸夐挳涓� 鐨勫洖璋� + var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮圭獥椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); //鑾峰彇閫変腑鐨勮鏁版嵁 + if (checkStatus.data.length != 1) { + return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + debugger + //鑾峰彇鏁版嵁 + $("#HMainSourceBillType").val(checkStatus.data[0].鍗曟嵁绫诲瀷);//婧愬崟绫诲瀷 + $("#HMainSourceBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);//婧愬崟鍚嶇О + $("#HMainSourceInterID").val(checkStatus.data[0].hmainid); // 婧愬崟id + $("#HMainSourceEntryID").val(checkStatus.data[0].hsubid); //婧愬崟瀛恑d + + //鍏抽棴椤甸潰 + layer.close(index); + } + }) } //鏃犳簮鍗曟柊澧� @@ -744,7 +856,13 @@ , "HDeleteMan": data.浣滃簾浜� , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(new Date(data.浣滃簾鏃ユ湡), "yyyy-MM-dd") }); - + + if (isEmpty(data.瀹℃牳浜�) === false) { + $('#add-btn').addClass('layui-btn-disabled').attr('disabled', true); + } else { + $('#check-btn').removeClass('layui-btn-disabled').attr('disabled', false); + } + } else { layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' }); } @@ -874,13 +992,36 @@ if (checkStatus.data.length === 0) { return layer.msg('璇烽�夋嫨鏁版嵁'); } + else if (checkStatus.data.length === 1) { + //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊� + obj.update({ + HRepairCheckID: checkStatus.data[0].hitemid, + HRepairCheckCode: checkStatus.data[0].缁翠慨楠屾敹椤圭洰浠g爜, + HRepairCheckName: checkStatus.data[0].缁翠慨楠屾敹椤圭洰, + }); + } else { + let tableBak = table.cache['mainTable'] + let tempArr = [] - //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊� - obj.update({ - HRepairCheckID: checkStatus.data[0].hitemid, - HRepairCheckCode: checkStatus.data[0].缁翠慨楠屾敹椤圭洰浠g爜, - HRepairCheckName: checkStatus.data[0].缁翠慨楠屾敹椤圭洰, - }); + for (let tableOne of tableBak) { + if (isEmpty(tableOne.HRepairCheckID, true, true) === false) { + tempArr.push(tableOne) + } + } + + for (let checkOne of checkStatus.data) { + tempArr.push({ + HRepairCheckID: checkOne.hitemid, + HRepairCheckCode: checkOne.缁翠慨楠屾敹椤圭洰浠g爜, + HRepairCheckName: checkOne.缁翠慨楠屾敹椤圭洰, + }) + } + + table.reload('mainTable', { + data: tempArr + }) + } + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� } @@ -889,7 +1030,14 @@ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 }, end: function () { - + if (isEmpty(optionData) === false) { + obj.update({ + HRepairCheckID: optionData[0].hitemid, + HRepairCheckCode: optionData[0].缁翠慨楠屾敹椤圭洰浠g爜, + HRepairCheckName: optionData[0].缁翠慨楠屾敹椤圭洰, + }) + optionData = [] + } } }); } @@ -915,7 +1063,6 @@ if (checkStatus.data.length === 0) { return layer.msg('璇烽�夋嫨鏁版嵁'); } - //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊� obj.update({ HManagerID: checkStatus.data[0].HItemID, @@ -930,7 +1077,14 @@ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 }, end: function () { - + if (isEmpty(optionData) === false) { + obj.update({ + HManagerID: optionData[0].HItemID, + HManagerCode: optionData[0].鑱屽憳浠g爜, + HManagerName: optionData[0].鑱屽憳鍚嶇О + }); + optionData = [] + } } }); } @@ -986,6 +1140,30 @@ layer.alert(sMsg, { icon: 5 }); } + + //鑾峰彇缁勭粐 + function Organ() { + //鑾峰彇鐧诲綍椤电粍缁囧垪 + $.ajax({ + type: "get", + async: false, + url: GetWEBURL() + "/Web/GetOrganizations", + success: function (result) { + var Organization = ""; + if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + var data = result.data; + for (var i = 0; i < data.length; i++) { + Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; + } + $("#HOrgID").append(Organization); + $("#HOrgID").val(sessionStorage["OrganizationID"]) + form.render('select'); + } + layer.closeAll("loading"); + } + }) + } + //#endregion }); @@ -1015,6 +1193,22 @@ $("#HMouldRepairWorkID").val(obj[0].hmainid); } + function GetMouldRepairWorkValue(obj) { // 杩斿洖婧愬崟 + $("#HMainSourceBillType").val(obj[0].鍗曟嵁绫诲瀷);//婧愬崟绫诲瀷 + $("#HMainSourceBillNo").val(obj[0].鍗曟嵁鍙�);//婧愬崟鍚嶇О + $("#HMainSourceInterID").val(obj[0].hmainid); // 婧愬崟id + $("#HMainSourceEntryID").val(obj[0].hsubid); //婧愬崟瀛恑d + } + + function GetGy_RepairCheckListValue(data) { // 杩斿洖楠屾敹椤圭洰 + optionData = data + } + + function GetHManagerValue(data) { // 杩斿洖璐熻矗浜� + optionData = data + } + + </script> </body> diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldConkBookBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldConkBookBillList.html" index 54633da..10643f3 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldConkBookBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldConkBookBillList.html" @@ -1081,9 +1081,9 @@ //褰撳墠鐢ㄦ埛璁剧疆鏈夐粯璁ょ殑杩囨护鏂规 var data = data1.data; //褰撳墠閫夋嫨鐨勮繃婊ゆ柟妗� - HInterID_Choose = data[0].HInterID; + HInterID_Choose = data[0].hmainid; //杩囨护鏂规鍐呯爜 - HInterID = data[0].HInterID + HInterID = data[0].hmainid //杩囨护鏂规鍚嶇О HDefaultFilter = data[0].鏂规鍚嶇О //杩囨护鏂规鐨勫娉紙鏂规淇℃伅鎻忚堪锛� diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldRepairCheckBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldRepairCheckBillList.html" index 5a5e318..daf6a0b 100644 --- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldRepairCheckBillList.html" +++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldRepairCheckBillList.html" @@ -1,5 +1,6 @@ 锘�<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> + <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>鍣ㄥ叿缁翠慨楠屾敹鍗曞垪琛�</title> @@ -20,6 +21,7 @@ } </style> </head> + <body> <div class="layui-fluid"> <div class="layui-col-md12"> @@ -36,60 +38,85 @@ <div class="layui-inline"> <label class="layui-form-label">鍗曟嵁鍙�</label> <div class="layui-input-block"> - <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo"> - </div> - </div> - <div class="layui-inline"> - <label class="layui-form-label">鍒跺崟浜�</label> - <div class="layui-input-block"> - <input type="text" class="layui-input ForFilteringSchemes" name="HCreateBy" id="HCreateBy"> + <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" + id="HBillNo"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">鏃ユ湡闂撮殧</label> <div class="layui-input-block"> - <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;"> + <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" + lay-filter="HInitTimeCycle" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> <label class="layui-form-label">寮�濮嬫椂闂�</label> <div class="layui-input-block"> - <input type="date" class="layui-input ForFilteringSchemes" name="HBeginDate" id="HBeginDate"> + <input type="date" class="layui-input ForFilteringSchemes" name="HBeginDate" + id="HBeginDate"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">缁撴潫鏃堕棿</label> <div class="layui-input-block"> - <input type="date" class="layui-input ForFilteringSchemes" name="HEndDate" id="HEndDate"> + <input type="date" class="layui-input ForFilteringSchemes" name="HEndDate" + id="HEndDate"> </div> </div> - <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> + <button class="layui-btn layuiadmin-btn-order" 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">閲嶇疆</button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" + lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button> <!--鏄剧ず褰撳墠杩囨护鏂规--> <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 style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" + id="HFilterScheme_Now"></div> </div> <div class="layui-colla-content"> + <div class="layui-row" style="margin: 5px 0;"> + <div class="layui-inline"> + <label class="layui-form-label">鍒跺崟浜�</label> + <div class="layui-input-block"> + <input type="text" class="layui-input ForFilteringSchemes" + name="HCreateBy" id="HCreateBy"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">缁勭粐</label> + <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> + <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" + class="ForFilteringSchemes"> + <!--鍔ㄦ�佹覆鏌撶粍缁�--> + </select> + </div> + </div> + </div> <div class="layui-row"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName" id="ColName" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;"> + <select name="ColName" id="ColName" class="ForFilteringSchemes" + lay-filter="ColName" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;"> + <select name="Comparator" id="Comparator" class="ForFilteringSchemes" + lay-filter="Comparator" style="width:190px;"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> <option value="7">鍖呭惈</option> <option value="8">宸﹀寘鍚�</option> <option value="9">鍙冲寘鍚�</option> @@ -97,26 +124,33 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input ForFilteringSchemes" 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:5px"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;"> + <select name="ColName1" id="ColName1" class="ForFilteringSchemes" + lay-filter="ColName1" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;"> + <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" + lay-filter="Comparator1" style="width:190px;"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> <option value="7">鍖呭惈</option> <option value="8">宸﹀寘鍚�</option> <option value="9">鍙冲寘鍚�</option> @@ -124,26 +158,33 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1"> + <input type="text" class="layui-input ForFilteringSchemes" value="" + name="ColContent1" id="ColContent1"> </div> </div> <div class="layui-row" style="margin-top:5px"> <div class="layui-inline"> <label class="layui-form-label">杩囨护</label> <div class="layui-input-block"> - <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;"> + <select name="ColName2" id="ColName2" class="ForFilteringSchemes" + lay-filter="ColName2" style="width:190px;"> </select> </div> </div> <div class="layui-inline"> - <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;"> + <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" + lay-filter="Comparator2" style="width:190px;"> <option value="0" selected="selected"></option> <option value="=">=</option> <option value=">=">>=</option> <option value=">">></option> - <option value="<="><=</option> - <option value="<"><</option> - <option value="<>"><></option> + <option value="<="> + <=< /option> + <option value="<"> + << /option> + <option value="<>"> + <> + </option> <option value="7">鍖呭惈</option> <option value="8">宸﹀寘鍚�</option> <option value="9">鍙冲寘鍚�</option> @@ -151,7 +192,8 @@ </select> </div> <div class="layui-inline"> - <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2"> + <input type="text" class="layui-input ForFilteringSchemes" value="" + name="ColContent2" id="ColContent2"> </div> </div> </div> @@ -197,7 +239,7 @@ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ index: 'lib/index', //涓诲叆鍙fā鍧� - }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () { + }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate', 'soulTable'], function () { //#region 鍏敤鍙橀噺 var $ = layui.$ , admin = layui.admin @@ -252,6 +294,9 @@ var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType); //#endregion + + //鍒濆鍖栫粍缁� + Organ(); //鍒濆鍖栬〃鏍� set_InitGrid(); //鍔犺浇鏁版嵁鍒扮綉鏍� @@ -318,6 +363,14 @@ break; }; }); + + //琛ㄦ牸鑷畾涔変簨浠� + table.on('tool(mainTable)', function (obj) { + let data = obj.data + switch (obj.event) { + case "onHBillNumberClickHandler": onHBillNumberClickHandler(data); break; + } + }) //鏌ヨ鎸夐挳 form.on('submit(btnSearch)', function () {//閫夋嫨浠撲綅 if (page != 1) { @@ -390,7 +443,7 @@ , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 200, sort: true } , { field: '澶囨敞', title: '澶囨敞', width: 200, sort: true } , { field: 'hsubid', title: 'hsubid', width: 200, hide: true, sort: true } - , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 115, hide: true, sort: true, totalRow: true} + , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 115, hide: true, sort: true, totalRow: true } , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 115, sort: true } , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200, sort: true } , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200, hide: true, sort: true } @@ -473,7 +526,7 @@ switch (data[i].Type) { //int case 'DateTime': - col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 160 }); + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 160 }); break; case 'Decimal': col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); @@ -482,7 +535,16 @@ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140, totalRow: true }); break; default: - col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + if (data[i].name === '鍗曟嵁鍙�') { + col.push({ + field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, + templet: function (d) { + return '<span style="color: blue;" lay-unrow >' + d.鍗曟嵁鍙� + '</span>' + }, style: 'cursor: pointer;', event: 'onHBillNumberClickHandler' + }); + } else { + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 140 }); + } } } } @@ -502,8 +564,9 @@ //鍒锋柊鎸夐挳鏄剧ず Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); - if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { + if ($("#ColName option").length < 1) { ColFilter(); + get_DefaultModule() } layer.close(ajaxLoad); @@ -552,8 +615,7 @@ } //鏂板 - function set_AddNew() - { + function set_AddNew() { layer.open({ type: 2, skin: 'layui-layer-rim', //鍔犱笂杈规 @@ -614,7 +676,7 @@ $.ajax({ type: "GET", url: GetWEBURL() + "/Sc_MouldRepairCheckBill/DeltetMouldRepairCheckBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� - data: { "HInterID": HInterID, "user": sessionStorage["HUserName"]}, + data: { "HInterID": HInterID, "user": sessionStorage["HUserName"] }, success: function (result) { if (result.count == 1) { layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { @@ -1111,6 +1173,55 @@ }) } + //鑾峰彇缁勭粐 + function Organ() { + //鑾峰彇鐧诲綍椤电粍缁囧垪 + $.ajax({ + type: "get", + async: false, + url: GetWEBURL() + "/Web/GetOrganizations", + success: function (result) { + var Organization = ""; + if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + var data = result.data; + for (var i = 0; i < data.length; i++) { + Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; + } + $("#HOrgID").append(Organization); + $("#HOrgID").val(sessionStorage["OrganizationID"]) + form.render('select'); + } + layer.closeAll("loading"); + } + }) + } + + + + + //#region 鑷畾涔変簨浠剁洃鍚� + function onHBillNumberClickHandler(data) { + var hID = data.hmainid; + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '缂栬緫' + HPageTitle + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: '../妯℃不鍏风鐞�/Sc_Add_MouldRepairCheckBillList.html?OperationType=3&linterid=' + hID + '&HSouceBillType=' + , resize: false, + end: function () { + //鍒锋柊椤甸潰, + location.reload(); + } + , cancel: function () { + //$(".layui-btn").removeClass("layui-btn-disabled"); + } + }) + } + //#endregion + //#endregion //浠ヤ笂鏄痩ayui妯″潡 @@ -1119,8 +1230,8 @@ //#region 銆愯繃婊ゆ柟妗堣繑鍥炴暟鎹�� function HFilterScheme(obj) //杩斿洖杩囨护鏂规 { - var HInterID = obj[0].HInterID; - HInterID_Choose = obj[0].HInterID; + var HInterID = obj[0].hmainid; + HInterID_Choose = obj[0].hmainid; $.ajax({ url: GetWEBURL() + '/Xt_FastICScheme/Chooselist', type: "GET", @@ -1134,7 +1245,7 @@ //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗� 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].HInterID + HInterID = data[0].hmainid //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢 for (let i = 0; i < data.length; i++) { $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�); @@ -1159,4 +1270,5 @@ </script> </body> -</html> + +</html> \ No newline at end of file -- Gitblit v1.9.1